Packages

p

com.datastax.spark

connector

package connector

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. All

Type Members

  1. final class CassandraRow extends ScalaGettableData with Serializable

    Represents a single row fetched from Cassandra.

    Represents a single row fetched from Cassandra. Offers getters to read individual fields by column name or column index. The getters try to convert value to desired type, whenever possible. Most of the column types can be converted to a String. For nullable columns, you should use the getXXXOption getters which convert nulls to None values, otherwise a NullPointerException would be thrown.

    All getters throw an exception if column name/index is not found. Column indexes start at 0.

    If the value cannot be converted to desired type, com.datastax.spark.connector.types.TypeConversionException is thrown.

    Recommended getters for Cassandra types:

    - ascii: getString, getStringOption - bigint: getLong, getLongOption - blob: getBytes, getBytesOption - boolean: getBool, getBoolOption - counter: getLong, getLongOption - decimal: getDecimal, getDecimalOption - double: getDouble, getDoubleOption - float: getFloat, getFloatOption - inet: getInet, getInetOption - int: getInt, getIntOption - text: getString, getStringOption - timestamp: getDate, getDateOption - timeuuid: getUUID, getUUIDOption - uuid: getUUID, getUUIDOption - varchar: getString, getStringOption - varint: getVarInt, getVarIntOption - list: getList[T] - set: getSet[T] - map: getMap[K, V]

    Collection getters getList, getSet and getMap require to explicitly pass an appropriate item type:

    row.getList[String]("a_list")
    row.getList[Int]("a_list")
    row.getMap[Int, String]("a_map")

    Generic get allows to automatically convert collections to other collection types. Supported containers: - scala.collection.immutable.List - scala.collection.immutable.Set - scala.collection.immutable.TreeSet - scala.collection.immutable.Vector - scala.collection.immutable.Map - scala.collection.immutable.TreeMap - scala.collection.Iterable - scala.collection.IndexedSeq - java.util.ArrayList - java.util.HashSet - java.util.HashMap

    Example:

    row.get[List[Int]]("a_list")
    row.get[Vector[Int]]("a_list")
    row.get[java.util.ArrayList[Int]]("a_list")
    row.get[TreeMap[Int, String]]("a_map")

    Timestamps can be converted to other Date types by using generic get. Supported date types: - java.util.Date - java.sql.Date

  2. case class CassandraRowMetadata(columnNames: IndexedSeq[String], resultSetColumnNames: Option[IndexedSeq[String]] = None, codecs: IndexedSeq[TypeCodec[AnyRef]] = null) extends Product with Serializable

    All CassandraRows shared data

    All CassandraRows shared data

    columnNames

    row column names

    resultSetColumnNames

    column names from java driver row result set, without connector aliases.

    codecs

    cached java driver codecs to avoid registry lookups

  3. sealed trait CollectionBehavior extends AnyRef

    Insert behaviors for Collections.

  4. case class CollectionColumnName(columnName: String, alias: Option[String] = None, collectionBehavior: CollectionBehavior = CollectionOverwrite) extends ColumnRef with Product with Serializable

    References a collection column by name with insert instructions

  5. case class ColumnName(columnName: String, alias: Option[String] = None) extends ColumnRef with Product with Serializable

    References a column by name.

  6. class ColumnNotFoundException extends Exception

    Thrown when the requested column does not exist in the result set.

  7. sealed trait ColumnRef extends AnyRef

    A column that can be selected from CQL results set by name.

  8. case class FunctionCallRef(columnName: String, actualParams: Seq[Either[ColumnRef, String]] = Seq.empty, alias: Option[String] = None) extends ColumnRef with Product with Serializable

    References a function call *

  9. trait GettableByIndexData extends Serializable
  10. trait GettableData extends GettableByIndexData
  11. trait ScalaGettableByIndexData extends GettableByIndexData
  12. trait ScalaGettableData extends ScalaGettableByIndexData with GettableData
  13. case class TTL(columnName: String, alias: Option[String] = None) extends ColumnRef with Product with Serializable

    References TTL of a column.

  14. case class TableRef(table: String, keyspace: String, cluster: Option[String] = None) extends Product with Serializable

    Store table name, keyspace name and option cluster name, keyspace is equivalent to database

  15. final case class TupleValue(values: Any*) extends ScalaGettableByIndexData with Product with Serializable
  16. final case class UDTValue(metaData: CassandraRowMetadata, columnValues: IndexedSeq[AnyRef]) extends ScalaGettableData with Product with Serializable
  17. case class WriteTime(columnName: String, alias: Option[String] = None) extends ColumnRef with Product with Serializable

    References write time of a column.

Value Members

  1. object CassandraRow extends Serializable
  2. object CassandraRowMetadata extends Serializable
  3. object CollectionAppend extends CollectionBehavior with Product with Serializable
  4. object CollectionOverwrite extends CollectionBehavior with Product with Serializable
  5. object CollectionPrepend extends CollectionBehavior with Product with Serializable
  6. object CollectionRemove extends CollectionBehavior with Product with Serializable
  7. object GettableData extends Serializable
  8. object RowCountRef extends ColumnRef with Product with Serializable

    References a row count value returned from SELECT count(*)

  9. object TupleValue extends Serializable
  10. object UDTValue extends Serializable

Ungrouped