@@ -99,34 +99,43 @@ final class CassandraRow(data: IndexedSeq[AnyRef], columnNames: IndexedSeq[Strin
99
99
* Looks the column up by column name. Column names are case-sensitive.*/
100
100
def get [T ](name : String )(implicit c : TypeConverter [T ]): T =
101
101
get[T ](_indexOfOrThrow(name))
102
-
103
- /** Equivalent to `getAny` */
104
- def apply (index : Int ): Any = getAny(index)
105
- def apply (name : String ): Any = getAny(name)
106
-
107
- def get (index : Int ): AnyRef = getAnyRef(index)
108
- def get (name : String ): AnyRef = getAnyRef(name)
109
102
110
103
/** Returns a column value without applying any conversion.
111
104
* The underlying type is the same as the type returned by the low-level Cassandra driver.
112
105
* May return Java null. */
113
- def getAny (index : Int ) = get[Any ](index)
114
- def getAny (name : String ) = get[Any ](name)
106
+ @ deprecated(" Use getRaw instead" , " 1.1" )
107
+ def getAny (index : Int ) = getRaw(index)
108
+ @ deprecated(" Use getRaw instead" , " 1.1" )
109
+ def getAny (name : String ) = getRaw(name)
115
110
116
111
/** Returns a column value without applying any conversion, besides converting a null to a None.
117
112
* The underlying type is the same as the type returned by the low-level Cassandra driver.*/
118
- def getAnyOption (index : Int ) = get[Option [Any ]](index)
119
- def getAnyOption (name : String ) = get[Option [Any ]](name)
113
+ @ deprecated(" Use getRaw and wrap the result in an Option instead" , " 1.1" )
114
+ def getAnyOption (index : Int ) = Option (getRaw(index))
115
+ @ deprecated(" Use getRaw and wrap the result in an Option instead" , " 1.1" )
116
+ def getAnyOption (name : String ) = Option (getRaw(name))
120
117
121
- /** Returns a column value by index without applying any conversion.
122
- * The underlying type is the same as the type returned by the low-level Cassandra driver. */
123
- def getAnyRef (index : Int ) = get[AnyRef ](index)
124
- def getAnyRef (name : String ) = get[AnyRef ](name)
118
+ /** Returns a column value without applying any conversion.
119
+ * The underlying type is the same as the type returned by the low-level Cassandra driver.
120
+ * May return Java null. */
121
+ @ deprecated(" Use getRaw instead" , " 1.1" )
122
+ def getAnyRef (index : Int ) = getRaw(index)
123
+ @ deprecated(" Use getRaw instead" , " 1.1" )
124
+ def getAnyRef (name : String ) = getRaw(name)
125
125
126
126
/** Returns a column value without applying any conversion, besides converting a null to a None.
127
- * The underlying type is the same as the type returned by the low-level Cassandra driver. */
128
- def getAnyRefOption (index : Int ) = get[Option [AnyRef ]](index)
129
- def getAnyRefOption (name : String ) = get[Option [AnyRef ]](name)
127
+ * The underlying type is the same as the type returned by the low-level Cassandra driver.*/
128
+ @ deprecated(" Use getRaw and wrap the result in an Option instead" , " 1.1" )
129
+ def getAnyRefOption (index : Int ) = Option (getRaw(index))
130
+ @ deprecated(" Use getRaw and wrap the result in an Option instead" , " 1.1" )
131
+ def getAnyRefOption (name : String ) = Option (getRaw(name))
132
+
133
+ /** Returns a column value by index without applying any conversion.
134
+ * The underlying type is the same as the type returned by the low-level Cassandra driver,
135
+ * is implementation defined and may change in the future.
136
+ * Cassandra nulls are returned as Scala nulls. */
137
+ def getRaw (index : Int ): AnyRef = data(index)
138
+ def getRaw (name : String ): AnyRef = data(_indexOfOrThrow(name))
130
139
131
140
/** Returns a `bool` column value. Besides working with `bool` Cassandra type, it can also read
132
141
* numbers and strings. Non-zero numbers are converted to `true`, zero is converted to `false`.
0 commit comments