scala.dbc
class DataType

[source: `scala/dbc/DataType.scala`]

`abstract` `class` DataType
  `extends` AnyRef

  An ISO-9075:2003 (SQL) data type. Mappings between SQL types and database specific types should be provided by the database driver.

Direct Known Subclasses:
  Boolean, Numeric, String, Unknown

Type Summary
`abstract type` | NativeType The native Scala type in which values of this SQL type will be encoded.

Method Summary
`abstract def` | isEquivalent (datatype : DataType) : Boolean Tests whether this datatype is equivalent to another. Usually, two types are defined as equivalent if they are equal. Two types can be equivalent without being equal if values of those types will be encoded in the same native Scala type.
`abstract def` | isSubtypeOf (datatype : DataType) : Boolean Tests whether this datatype is equivalent or a subtype of another datatype. Type `A` is said to be subtype of type `B` if any value of type `A` can be represented as a value of type `B`.
`abstract def` | nativeTypeId : Int The native Scala type in which values of this SQL type will be encoded. This must point to the same type as `NativeType`.
`def` | nullable : Option[Boolean] Whether the value can take the null value, None when this property is unknown.
`def` | sqlString : java.lang.String The SQL name of the type

Methods inherited from AnyRef
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized

Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf

Type Details

`abstract` `type` NativeType

  The native Scala type in which values of this SQL type will be encoded.

Method Details

`abstract` `def` isEquivalent(datatype : DataType) : Boolean

  Tests whether this datatype is equivalent to another. Usually, two types are defined as equivalent if they are equal. Two types can be equivalent without being equal if values of those types will be encoded in the same native Scala type.

`abstract` `def` isSubtypeOf(datatype : DataType) : Boolean

  Tests whether this datatype is equivalent or a subtype of another datatype. Type `A` is said to be subtype of type `B` if any value of type `A` can be represented as a value of type `B`.

`abstract` `def` nativeTypeId : Int

  The native Scala type in which values of this SQL type will be encoded. This must point to the same type as `NativeType`.

`` `def` nullable : Option[Boolean]

  Whether the value can take the null value, None when this property is unknown.

`` `def` sqlString : java.lang.String

  The SQL name of the type