Table
class Table<T : Any>(val primaryKey: KProperty1<T, *>, foreignKeys: List<Pair<KProperty1<T, *>, KClass<*>>> = listOf(), constraints: List<Pair<KProperty1<T, *>, List<C>>> = listOf(), val serializers: List<TypeSerializer<*>> = listOf(), columnSerializers: List<Pair<KProperty1<T, *>, TypeSerializer<*>>> = listOf())
A class representing a table in a database or schema. This class is intermediate structure created by the user which is then converted by the Mapper to more appropriate TableInfo structure.
Parameters
T
the type that represents database table.
Constructors
Link copied to clipboard
constructor(primaryKey: KProperty1<T, *>, foreignKeys: List<Pair<KProperty1<T, *>, KClass<*>>> = listOf(), constraints: List<Pair<KProperty1<T, *>, List<C>>> = listOf(), serializers: List<TypeSerializer<*>> = listOf(), columnSerializers: List<Pair<KProperty1<T, *>, TypeSerializer<*>>> = listOf())
Properties
Link copied to clipboard
Represents a map of column serializers. This serializer have the highest priority over all other serializers defined inside database serializer.
Link copied to clipboard
Map of Table column constraints.
Link copied to clipboard
Map of Table foreign keys that points to specific foreign class.
Link copied to clipboard
the primary key of the table.
Link copied to clipboard
the serializers which will overrides global and schema serializer that will help serialize table columns (optional).