DataTypeProvider

abstract class DataTypeProvider

Provides definitions for all the supported SQL data types. By default, definitions from the SQL standard are provided but if a vendor doesn't support a specific type, or it is implemented differently, the corresponding function should be overridden.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
abstract fun binaryType(): String

Binary type for storing binary strings of variable and unlimited length.

open fun binaryType(length: Int): String

Binary type for storing binary strings of a specific length.

Link copied to clipboard
open fun blobType(): String

Binary type for storing BLOBs.

Link copied to clipboard

Returns the boolean value of the specified SQL value.

Link copied to clipboard

Returns the SQL representation of the specified bool value.

Link copied to clipboard
open fun booleanType(): String

Data type for storing boolean values.

Link copied to clipboard
open fun byteType(): String

Numeric type for storing 1-byte integers.

Link copied to clipboard
open fun dateTimeType(): String

Data type for storing both date and time without a time zone.

Link copied to clipboard
open fun dateType(): String

Data type for storing date without time or a time zone.

Link copied to clipboard
open fun doubleType(): String

Numeric type for storing 8-byte (double precision) floating-point numbers.

Link copied to clipboard
open fun floatType(): String

Numeric type for storing 4-byte (single precision) floating-point numbers.

Link copied to clipboard
abstract fun hexToDb(hexString: String): String

Returns the hex-encoded value to be inserted into the database.

Link copied to clipboard

Numeric type for storing 4-byte integers, marked as auto-increment.

Link copied to clipboard
open fun integerType(): String

Numeric type for storing 4-byte integers.

Link copied to clipboard
open fun jsonBType(): String

Data type for storing JSON in a decomposed binary format.

Link copied to clipboard
open fun jsonType(): String

Data type for storing JSON in a non-binary text format.

Link copied to clipboard
open fun largeTextType(): String

Character type for storing strings of variable and large length.

Link copied to clipboard

Numeric type for storing 8-byte integers, and marked as auto-increment.

Link copied to clipboard
open fun longType(): String

Numeric type for storing 8-byte integers.

Link copied to clipboard

Character type for storing strings of medium length.

Link copied to clipboard
open fun precessOrderByClause(queryBuilder: QueryBuilder, expression: Expression<*>, sortOrder: SortOrder)

Returns the SQL representation of the specified expression, to be used in an ORDER BY clause.

Link copied to clipboard

Returns the SQL representation of the specified expression, for it to be used as a column default value.

Link copied to clipboard
open fun shortType(): String

Numeric type for storing 2-byte integers.

Link copied to clipboard
open fun textType(): String

Character type for storing strings of variable length. Some database (postgresql) use the same data type name to provide virtually unlimited length.

Link copied to clipboard

Data type for storing both date and time with a time zone.

Link copied to clipboard
open fun timeType(): String

Time type for storing time without a time zone.

Link copied to clipboard
open fun ubyteType(): String

Numeric type for storing 1-byte unsigned integers.

Link copied to clipboard

Numeric type for storing 4-byte unsigned integers, marked as auto-increment.

Link copied to clipboard
open fun uintegerType(): String

Numeric type for storing 4-byte unsigned integers.

Link copied to clipboard

Numeric type for storing 8-byte unsigned integers, marked as auto-increment.

Link copied to clipboard
open fun ulongType(): String

Numeric type for storing 8-byte unsigned integers.

Link copied to clipboard
open fun ushortType(): String

Numeric type for storing 2-byte unsigned integers.

Link copied to clipboard
open fun uuidToDB(value: UUID): Any

Returns a database-compatible object from the specified UUID value.

Link copied to clipboard
open fun uuidType(): String

Binary type for storing UUID.

Link copied to clipboard
open fun varcharType(colLength: Int): String

Character type for storing strings of variable length up to a maximum.