# 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

DataTypeProvider
Link copied to clipboard
constructor()

## Functions

binaryType
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.

blobType
Link copied to clipboard
open fun blobType(): String

Binary type for storing BLOBs.

booleanFromStringToBoolean
Link copied to clipboard
open fun booleanFromStringToBoolean(value: String): Boolean

Returns the boolean value of the specified SQL value.

booleanToStatementString
Link copied to clipboard
open fun booleanToStatementString(bool: Boolean): String

Returns the SQL representation of the specified bool value.

booleanType
Link copied to clipboard
open fun booleanType(): String

Data type for storing boolean values.

byteType
Link copied to clipboard
open fun byteType(): String

Numeric type for storing 1-byte integers.

dateTimeType
Link copied to clipboard
open fun dateTimeType(): String

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

dateType
Link copied to clipboard
open fun dateType(): String

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

doubleType
Link copied to clipboard
open fun doubleType(): String

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

floatType
Link copied to clipboard
open fun floatType(): String

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

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

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

integerAutoincType
Link copied to clipboard
open fun integerAutoincType(): String

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

integerType
Link copied to clipboard
open fun integerType(): String

Numeric type for storing 4-byte integers.

jsonBType
Link copied to clipboard
open fun jsonBType(): String

Data type for storing JSON in a decomposed binary format.

jsonType
Link copied to clipboard
open fun jsonType(): String

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

largeTextType
Link copied to clipboard
open fun largeTextType(): String

Character type for storing strings of variable and large length.

longAutoincType
Link copied to clipboard
open fun longAutoincType(): String

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

longType
Link copied to clipboard
open fun longType(): String

Numeric type for storing 8-byte integers.

mediumTextType
Link copied to clipboard
open fun mediumTextType(): String

Character type for storing strings of medium length.

precessOrderByClause
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.

processForDefaultValue
Link copied to clipboard
open fun processForDefaultValue(e: Expression<*>): String

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

shortType
Link copied to clipboard
open fun shortType(): String

Numeric type for storing 2-byte integers.

textType
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.

timestampWithTimeZoneType
Link copied to clipboard
open fun timestampWithTimeZoneType(): String

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

timeType
Link copied to clipboard
open fun timeType(): String

Time type for storing time without a time zone.

ubyteType
Link copied to clipboard
open fun ubyteType(): String

Numeric type for storing 1-byte unsigned integers.

uintegerAutoincType
Link copied to clipboard
open fun uintegerAutoincType(): String

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

uintegerType
Link copied to clipboard
open fun uintegerType(): String

Numeric type for storing 4-byte unsigned integers.

ulongAutoincType
Link copied to clipboard
open fun ulongAutoincType(): String

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

ulongType
Link copied to clipboard
open fun ulongType(): String

Numeric type for storing 8-byte unsigned integers.

ushortType
Link copied to clipboard
open fun ushortType(): String

Numeric type for storing 2-byte unsigned integers.

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

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

uuidType
Link copied to clipboard
open fun uuidType(): String

Binary type for storing UUID.

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

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