diff options
author | Burak Emir <emir@epfl.ch> | 2006-03-09 15:36:04 +0000 |
---|---|---|
committer | Burak Emir <emir@epfl.ch> | 2006-03-09 15:36:04 +0000 |
commit | 33bcd27ccd47bdbd5a0669fe059910d5eb9442dc (patch) | |
tree | 18c110a39bc334827bc077e56204c2c85a7e1896 /src | |
parent | 718cc9060ce80af502040d426e67bf2f333ff482 (diff) | |
download | scala-33bcd27ccd47bdbd5a0669fe059910d5eb9442dc.tar.gz scala-33bcd27ccd47bdbd5a0669fe059910d5eb9442dc.tar.bz2 scala-33bcd27ccd47bdbd5a0669fe059910d5eb9442dc.zip |
fixed names of view methods
Diffstat (limited to 'src')
-rw-r--r-- | src/library/scala/dbc/syntax/Statement.scala | 28 | ||||
-rw-r--r-- | src/library/scala/dbc/syntax/StatementExpression.scala | 2 | ||||
-rw-r--r-- | src/library/scala/dbc/value/ApproximateNumeric.scala | 4 | ||||
-rw-r--r-- | src/library/scala/dbc/value/Boolean.scala | 2 | ||||
-rw-r--r-- | src/library/scala/dbc/value/Character.scala | 2 | ||||
-rw-r--r-- | src/library/scala/dbc/value/CharacterLargeObject.scala | 2 | ||||
-rw-r--r-- | src/library/scala/dbc/value/CharacterVarying.scala | 2 | ||||
-rw-r--r-- | src/library/scala/dbc/value/ExactNumeric.scala | 12 |
8 files changed, 27 insertions, 27 deletions
diff --git a/src/library/scala/dbc/syntax/Statement.scala b/src/library/scala/dbc/syntax/Statement.scala index 5973bbc529..027a05b8fc 100644 --- a/src/library/scala/dbc/syntax/Statement.scala +++ b/src/library/scala/dbc/syntax/Statement.scala @@ -70,12 +70,12 @@ object Statement { } } - implicit def view1 (fv:StatementField): SelectDerivedField = new SelectDerivedField { + implicit def statementFieldToSelectDerivedField (fv:StatementField): SelectDerivedField = new SelectDerivedField { val fieldValue = fv; } - implicit def view2 (fv:String): SelectDerivedField = new SelectDerivedField { - val fieldValue: StatementField = StatementExpression.view(fv); + implicit def stringToSelectDerivedField (fv:String): SelectDerivedField = new SelectDerivedField { + val fieldValue: StatementField = StatementExpression.stringToStatementField(fv); } abstract class SelectDerivedColumns { @@ -91,7 +91,7 @@ object Statement { } } - implicit def view3 (sdf:SelectDerivedField): SelectDerivedColumns = new SelectDerivedColumns { + implicit def selectDerivedFieldToSelectDerivedColumns (sdf:SelectDerivedField): SelectDerivedColumns = new SelectDerivedColumns { val selectList = List(new statement.DerivedColumn { val valueExpression = sdf.fieldValue.toStatement; val asClause = sdf.fieldRename; @@ -99,9 +99,9 @@ object Statement { val selectTypes = if (sdf.fieldType.isEmpty) Nil else List(sdf.fieldType.get); } - implicit def view4 (sdfs:String): SelectDerivedColumns = { + implicit def stringToSelectDerivedColumns (sdfs:String): SelectDerivedColumns = { val sdf: SelectDerivedField = sdfs; - view3(sdf); + selectDerivedFieldToSelectDerivedColumns(sdf); } // SELECT OF ... @@ -161,7 +161,7 @@ object Statement { } } - implicit def view5 (sct:String): SelectSourceTable = new SelectSourceTable { + implicit def stringToSelectSourceTable (sct:String): SelectSourceTable = new SelectSourceTable { val fromRelation = new statement.Table { val tableName = sct; val tableRename = None; @@ -169,7 +169,7 @@ object Statement { } } - implicit def view6 (sct:statement.Select): SelectSourceTable = new SelectSourceTable { + implicit def selectToSelectSourceTable (sct:statement.Select): SelectSourceTable = new SelectSourceTable { val fromRelation = sct; } @@ -180,7 +180,7 @@ object Statement { } } - implicit def view7 (sct:String): SelectSourceTables = new SelectSourceTables { + implicit def stringToSelectSourceTables (sct:String): SelectSourceTables = new SelectSourceTables { val fromClause = List(new statement.Table { val tableName = sct; val tableRename = None; @@ -188,11 +188,11 @@ object Statement { }); } - implicit def view8 (sct:statement.Select): SelectSourceTables = new SelectSourceTables { + implicit def selectToSelectSourceTables (sct:statement.Select): SelectSourceTables = new SelectSourceTables { val fromClause = List(sct); } - implicit def view9 (sct:SelectSourceTable): SelectSourceTables = new SelectSourceTables { + implicit def selectSourceTableToSelectSourceTables (sct:SelectSourceTable): SelectSourceTables = new SelectSourceTables { val fromClause = List(sct.fromRelation); } @@ -235,7 +235,7 @@ object Statement { } } - implicit def view10 (sb:SelectBeyond): statement.Select = new statement.Select { + implicit def selectBeyondToStatementSelect (sb:SelectBeyond): statement.Select = new statement.Select { val setQuantifier = sb.setQuantifier; val selectList = sb.selectList; val fromClause = sb.fromClause; @@ -260,11 +260,11 @@ object Statement { } } - implicit def view11 (se:StatementExpression): SelectGroupBy = new SelectGroupBy { + implicit def statementExpressionToSelectGroupBy (se:StatementExpression): SelectGroupBy = new SelectGroupBy { val groupByClause = List(se.toStatement); } - implicit def view12 (se:String): SelectGroupBy = new SelectGroupBy { + implicit def stringToSelectGroupBy (se:String): SelectGroupBy = new SelectGroupBy { val groupByClause = List(new statement.expression.Field { val tableName = None; val fieldName = se; diff --git a/src/library/scala/dbc/syntax/StatementExpression.scala b/src/library/scala/dbc/syntax/StatementExpression.scala index aeb93a6ab9..78c75ae174 100644 --- a/src/library/scala/dbc/syntax/StatementExpression.scala +++ b/src/library/scala/dbc/syntax/StatementExpression.scala @@ -211,7 +211,7 @@ object StatementExpression { } } - implicit def view (ef:String): StatementField = new StatementField { + implicit def stringToStatementField (ef:String): StatementField = new StatementField { val fieldName = ef; } diff --git a/src/library/scala/dbc/value/ApproximateNumeric.scala b/src/library/scala/dbc/value/ApproximateNumeric.scala index e3310f6c1f..5da4fec640 100644 --- a/src/library/scala/dbc/value/ApproximateNumeric.scala +++ b/src/library/scala/dbc/value/ApproximateNumeric.scala @@ -22,7 +22,7 @@ abstract class ApproximateNumeric [Type] extends Value { object ApproximateNumeric { - def view (obj:value.ApproximateNumeric[Float]): Float = obj.nativeValue; - def view (obj:value.ApproximateNumeric[Double]): Double = obj.nativeValue; + implicit def approximateNumericToFloar (obj:value.ApproximateNumeric[Float]): Float = obj.nativeValue; + implicit def approximateNumericToDouble (obj:value.ApproximateNumeric[Double]): Double = obj.nativeValue; } diff --git a/src/library/scala/dbc/value/Boolean.scala b/src/library/scala/dbc/value/Boolean.scala index 57e9625a0f..fba78dcfd1 100644 --- a/src/library/scala/dbc/value/Boolean.scala +++ b/src/library/scala/dbc/value/Boolean.scala @@ -22,6 +22,6 @@ abstract class Boolean extends Value { object Boolean { - def view (obj:value.Boolean): scala.Boolean = obj.nativeValue; + implicit def booleanToBoolean (obj:value.Boolean): scala.Boolean = obj.nativeValue; } diff --git a/src/library/scala/dbc/value/Character.scala b/src/library/scala/dbc/value/Character.scala index d8aa2c47f8..c02a21b28e 100644 --- a/src/library/scala/dbc/value/Character.scala +++ b/src/library/scala/dbc/value/Character.scala @@ -30,6 +30,6 @@ abstract class Character extends Value { object Character { /** A character string value as a native string. */ - def view (obj:value.Character): String = obj.nativeValue; + implicit def characterToString (obj:value.Character): String = obj.nativeValue; } diff --git a/src/library/scala/dbc/value/CharacterLargeObject.scala b/src/library/scala/dbc/value/CharacterLargeObject.scala index 5915e101b6..61f55f868a 100644 --- a/src/library/scala/dbc/value/CharacterLargeObject.scala +++ b/src/library/scala/dbc/value/CharacterLargeObject.scala @@ -30,6 +30,6 @@ abstract class CharacterLargeObject extends Value { object CharacterLargeObject { /** A character large object value as a native string. */ - def view (obj:value.CharacterLargeObject): String = obj.nativeValue; + implicit def characterLargeObjectToString (obj:value.CharacterLargeObject): String = obj.nativeValue; } diff --git a/src/library/scala/dbc/value/CharacterVarying.scala b/src/library/scala/dbc/value/CharacterVarying.scala index c6f14b3a8a..177dbdba5b 100644 --- a/src/library/scala/dbc/value/CharacterVarying.scala +++ b/src/library/scala/dbc/value/CharacterVarying.scala @@ -30,6 +30,6 @@ abstract class CharacterVarying extends Value { object CharacterVarying { /** A character varying string value as a native string. */ - def view (obj:value.CharacterVarying): String = obj.nativeValue; + implicit def characterVaryingToString (obj:value.CharacterVarying): String = obj.nativeValue; } diff --git a/src/library/scala/dbc/value/ExactNumeric.scala b/src/library/scala/dbc/value/ExactNumeric.scala index 305a157b53..1c30c89c29 100644 --- a/src/library/scala/dbc/value/ExactNumeric.scala +++ b/src/library/scala/dbc/value/ExactNumeric.scala @@ -25,11 +25,11 @@ abstract class ExactNumeric [Type] extends Value { object ExactNumeric { - def view (obj:value.ExactNumeric[Byte]): Byte = obj.nativeValue; - def view (obj:value.ExactNumeric[Short]): Short = obj.nativeValue; - def view (obj:value.ExactNumeric[Int]): Int = obj.nativeValue; - def view (obj:value.ExactNumeric[Long]): Long = obj.nativeValue; - def view (obj:value.ExactNumeric[BigInteger]): BigInteger = obj.nativeValue; - def view (obj:value.ExactNumeric[BigDecimal]): BigDecimal = obj.nativeValue; + implicit def exactNumericToByte (obj:value.ExactNumeric[Byte]): Byte = obj.nativeValue; + implicit def exactNumericToShort (obj:value.ExactNumeric[Short]): Short = obj.nativeValue; + implicit def exactNumericToInt (obj:value.ExactNumeric[Int]): Int = obj.nativeValue; + implicit def exactNumericToLong (obj:value.ExactNumeric[Long]): Long = obj.nativeValue; + implicit def exactNumericToBigInteger (obj:value.ExactNumeric[BigInteger]): BigInteger = obj.nativeValue; + implicit def exactNumericToBigDecimal (obj:value.ExactNumeric[BigDecimal]): BigDecimal = obj.nativeValue; } |