Package org.ktorm.schema
Database schema supports, including table and column definition, column binding, and SQL types.
Types
Name | Summary |
---|---|
abstract class BaseTable<E : Any> : TypeReference<E> Base class of Ktorm’s table objects, represents relational tables in the database. | |
SqlType implementation represents | |
SqlType implementation represents | |
SqlType implementation represents | |
data class Column<T : Any> : ColumnDeclaring<T> Represents database columns. | |
sealed class ColumnBinding Base class of column bindings. A column might be bound to a simple property, nested properties, | |
interface ColumnDeclaring<T : Any> Common interface of Column and ScalarExpression. | |
SqlType implementation represents | |
object DecimalSqlType : SqlType<BigDecimal> SqlType implementation represents | |
SqlType implementation represents | |
SqlType implementation that saves enums as strings. | |
SqlType implementation represents | |
SqlType implementation represents | |
SqlType implementation represents | |
SqlType implementation represents | |
object LocalDateTimeSqlType : SqlType<LocalDateTime> SqlType implementation represents | |
SqlType implementation represents | |
SqlType implementation represents | |
SqlType implementation used to save MonthDay instances, formatting them to strings with pattern | |
data class NestedBinding : ColumnBinding Bind the column to nested properties, eg. | |
data class ReferenceBinding : ColumnBinding Bind the column to a reference table, equivalent to a foreign key in relational databases. | |
SqlType implementation represents | |
abstract class SqlType<T : Any> Abstraction of SQL data types. | |
Base class of Ktorm’s table objects. This class extends from BaseTable, additionally providing a binding mechanism | |
SqlType implementation represents | |
SqlType implementation represents | |
SqlType implementation represents | |
abstract class TypeReference<T> Base class used to obtain full generic type information by subclassing. | |
SqlType implementation represents | |
SqlType implementation represents | |
SqlType implementation used to save YearMonth instances, formatting them to strings with pattern | |
SqlType implementation used to save Year instances as integers. |
Functions
Name | Summary |
---|---|
Define a column typed of BlobSqlType. | |
Define a column typed of BooleanSqlType. | |
Define a column typed of BytesSqlType. | |
Define a column typed of LocalDateSqlType. | |
fun BaseTable<*>.datetime( Define a column typed of LocalDateTimeSqlType. | |
fun BaseTable<*>.decimal(name: String): Column<BigDecimal> Define a column typed of DecimalSqlType. | |
Define a column typed of DoubleSqlType. | |
Define a column typed of EnumSqlType. | |
Define a column typed of FloatSqlType. | |
Define a column typed of IntSqlType. | |
Define a column typed of DateSqlType. | |
Define a column typed of TimeSqlType. | |
Define a column typed of TimestampSqlType. | |
fun <T> kotlinTypeOf(): KType Obtain the full generic type information of the reified type argument T, usage: | |
Define a column typed of LongSqlType. | |
Define a column typed of MonthDaySqlType, instances of MonthDay are saved as strings in format | |
Define a column typed of ShortSqlType. | |
Define a column typed of TextSqlType. | |
Define a column typed of LocalTimeSqlType. | |
Define a column typed of InstantSqlType. | |
fun <T> typeOf(): Type Obtain the full generic type information of the reified type argument T, usage: | |
fun <T> typeRef(): TypeReference<T> Create a TypeReference object which references the reified type argument T. | |
Define a column typed of UuidSqlType. | |
Define a column typed of VarcharSqlType. | |
Define a column typed of YearSqlType, instances of Year are saved as integers. | |
Define a column typed of YearMonthSqlType, instances of YearMonth are saved as strings in format |