Splitted column descriptor to table's column and query's column

This commit is contained in:
Andrew Golovashevich 2025-05-09 03:53:38 +03:00
parent f43b0470a0
commit 89c83c219f
9 changed files with 137 additions and 115 deletions

View File

@ -9,29 +9,29 @@ import ru.landgrafhomyak.db.skeleton1.api.runtime.InputRow
import ru.landgrafhomyak.db.skeleton1.api.table.TableConstructor
public interface CreateModuleScope<mUE : Any, RUNTIME_KEY : Any> {
public interface CreateModuleScope<mUE : Any, RK : Any> {
@Suppress("INAPPLICABLE_JVM_NAME")
@get:JvmName("rootNs")
public val rootNs: Namespace<mUE, RUNTIME_KEY>
public val rootNs: Namespace<mUE, RK>
public fun <tUE : Any> createTable(
lifeTime: Table.LifeTime = Table.LifeTime.DATABASE_SCOPE,
namespace: Namespace<mUE, RUNTIME_KEY> = this.rootNs,
name: String, initializer: TableConstructor<tUE, RUNTIME_KEY>
): Table<tUE, mUE, RUNTIME_KEY>
namespace: Namespace<mUE, RK> = this.rootNs,
name: String, initializer: TableConstructor<tUE, RK>
): Table<tUE, mUE, RK>
public fun moduleScopedObject(namespace: Namespace<mUE, RUNTIME_KEY> = this.rootNs, name: String): ModuleScopedObject<mUE, RUNTIME_KEY>
public fun moduleScopedObject(namespace: Namespace<mUE, RK> = this.rootNs, name: String): ModuleScopedObject<mUE, RK>
public fun <mUE : Any> substituteModule(rootNs: Namespace<mUE, RUNTIME_KEY>, template: Module.Template<mUE>): Module<mUE, RUNTIME_KEY>
public fun <mUE : Any> substituteModule(rootNs: Namespace<mUE, RK>, template: Module.Template<mUE>): Module<mUE, RK>
public fun namespace(parent: Namespace<mUE, RUNTIME_KEY>, name: String): Namespace<mUE, RUNTIME_KEY>
public fun namespace(parent: Namespace<mUE, RK>, name: String): Namespace<mUE, RK>
public fun addStatement(stmt: RawStatement.Void2Void.ImplementationsProvider<*>)
public fun addStatement(stmt: _Statement.Void2Void<*, RUNTIME_KEY>)
public fun addStatement(stmt: _Statement.Void2Void<*, RK>)
@LowLevelApi
public fun <sUE : Any> _addStatement(stmt: RawStatement.Params2Void.ImplementationsProvider<sUE>): InputRow._Scope<sUE, Unit>
public fun <sUE : Any> _addStatement(stmt: RawStatement.Params2Void.ImplementationsProvider<sUE>): InputRow._Scope<sUE, RK, Unit>
@LowLevelApi
public fun <sUE : Any> _addStatement(stmt: _Statement.Params2Void<sUE, RUNTIME_KEY>): InputRow._Scope<sUE, Unit>
public fun <sUE : Any> _addStatement(stmt: _Statement.Params2Void<sUE, RK>): InputRow._Scope<sUE, RK, Unit>
}

View File

@ -8,66 +8,66 @@ import ru.landgrafhomyak.db.skeleton1.api.table.Table
import ru.landgrafhomyak.db.skeleton1.api.table.TableUpgrade
public interface UpgradeModuleScope<nmUE : Any, omUE : Any, RUNTIME_KEY : Any> : CreateModuleScope<nmUE, RUNTIME_KEY> {
public fun <tUE : Any> keepTable(table: Table<tUE, omUE, RUNTIME_KEY>): Table<tUE, nmUE, RUNTIME_KEY>
public interface UpgradeModuleScope<nmUE : Any, omUE : Any, RK : Any> : CreateModuleScope<nmUE, RK> {
public fun <tUE : Any> keepTable(table: Table<tUE, omUE, RK>): Table<tUE, nmUE, RK>
public fun <tUE : Any> keepAndRenameTable(table: Table<tUE, omUE, RUNTIME_KEY>, newName: String): Table<tUE, nmUE, RUNTIME_KEY>
public fun <tUE : Any> keepAndRenameTable(table: Table<tUE, omUE, RUNTIME_KEY>, newNamespace: Namespace<nmUE, RUNTIME_KEY>): Table<tUE, nmUE, RUNTIME_KEY>
public fun <tUE : Any> keepAndRenameTable(table: Table<tUE, omUE, RUNTIME_KEY>, newNamespace: Namespace<nmUE, RUNTIME_KEY>, newName: String): Table<tUE, nmUE, RUNTIME_KEY>
public fun <tUE : Any> keepAndRenameTable(table: Table<tUE, omUE, RK>, newName: String): Table<tUE, nmUE, RK>
public fun <tUE : Any> keepAndRenameTable(table: Table<tUE, omUE, RK>, newNamespace: Namespace<nmUE, RK>): Table<tUE, nmUE, RK>
public fun <tUE : Any> keepAndRenameTable(table: Table<tUE, omUE, RK>, newNamespace: Namespace<nmUE, RK>, newName: String): Table<tUE, nmUE, RK>
public fun <ntUE : Any, otUE : Any> upgradeTable(oldTable: Table<otUE, omUE, RUNTIME_KEY>, upgrade: TableUpgrade<ntUE, otUE, RUNTIME_KEY>): Table<ntUE, nmUE, RUNTIME_KEY>
public fun <ntUE : Any, otUE : Any> upgradeTable(oldTable: Table<otUE, omUE, RK>, upgrade: TableUpgrade<ntUE, otUE, RK>): Table<ntUE, nmUE, RK>
public fun <ntUE : Any, otUE : Any> upgradeAndRenameTable(
table: Table<otUE, omUE, RUNTIME_KEY>,
table: Table<otUE, omUE, RK>,
newName: String,
upgrade: TableUpgrade<ntUE, otUE, RUNTIME_KEY>
): Table<ntUE, nmUE, RUNTIME_KEY>
upgrade: TableUpgrade<ntUE, otUE, RK>
): Table<ntUE, nmUE, RK>
public fun <ntUE : Any, otUE : Any> upgradeAndRenameTable(
table: Table<otUE, omUE, RUNTIME_KEY>,
newNamespace: Namespace<nmUE, RUNTIME_KEY>,
upgrade: TableUpgrade<ntUE, otUE, RUNTIME_KEY>
): Table<ntUE, nmUE, RUNTIME_KEY>
table: Table<otUE, omUE, RK>,
newNamespace: Namespace<nmUE, RK>,
upgrade: TableUpgrade<ntUE, otUE, RK>
): Table<ntUE, nmUE, RK>
public fun <ntUE : Any, otUE : Any> upgradeAndRenameTable(
table: Table<otUE, omUE, RUNTIME_KEY>,
newNamespace: Namespace<nmUE, RUNTIME_KEY>,
upgrade: TableUpgrade<ntUE, otUE, RUNTIME_KEY>,
table: Table<otUE, omUE, RK>,
newNamespace: Namespace<nmUE, RK>,
upgrade: TableUpgrade<ntUE, otUE, RK>,
newName: String
): Table<ntUE, nmUE, RUNTIME_KEY>
): Table<ntUE, nmUE, RK>
public fun deleteTable(table: Table<*, omUE, RUNTIME_KEY>)
public fun deleteTable(table: Table<*, omUE, RK>)
public fun <tUE : Any> deleteTableAfterModuleUpgrade(table: Table<tUE, omUE, RUNTIME_KEY>): Table<tUE, nmUE, RUNTIME_KEY>
public fun <tUE : Any> deleteTableAfterModuleUpgrade(table: Table<tUE, omUE, RK>): Table<tUE, nmUE, RK>
public fun exportTable(table: Table<*, omUE, RUNTIME_KEY>)
public fun exportTable(table: Table<*, omUE, RK>)
public fun <tUE : Any> importTable(
namespace: Namespace<nmUE, RUNTIME_KEY> = this.rootNs, name: String,
table: Table<tUE, *, RUNTIME_KEY>
): Table<tUE, nmUE, RUNTIME_KEY>
namespace: Namespace<nmUE, RK> = this.rootNs, name: String,
table: Table<tUE, *, RK>
): Table<tUE, nmUE, RK>
public fun <ntUE : Any, otUE : Any> importAndUpgradeTable(
namespace: Namespace<nmUE, RUNTIME_KEY> = this.rootNs, name: String,
table: Table<otUE, *, RUNTIME_KEY>,
upgrade: TableUpgrade<ntUE, otUE, RUNTIME_KEY>
): Table<ntUE, nmUE, RUNTIME_KEY>
namespace: Namespace<nmUE, RK> = this.rootNs, name: String,
table: Table<otUE, *, RK>,
upgrade: TableUpgrade<ntUE, otUE, RK>
): Table<ntUE, nmUE, RK>
public fun <smUE : Any> keepModule(module: Module<smUE, RUNTIME_KEY>): Module<smUE, RUNTIME_KEY>
public fun <smUE : Any> keepAndMoveModule(oldModule: Module<smUE, RUNTIME_KEY>, newNs: Namespace<nmUE, RUNTIME_KEY>): Module<smUE, RUNTIME_KEY>
public fun <smUE : Any> keepModule(module: Module<smUE, RK>): Module<smUE, RK>
public fun <smUE : Any> keepAndMoveModule(oldModule: Module<smUE, RK>, newNs: Namespace<nmUE, RK>): Module<smUE, RK>
public fun <smUE : Any> upgradeModule(oldModule: Module<*, RUNTIME_KEY>, template: Module.Template<smUE>): Module<smUE, RUNTIME_KEY>
public fun <smUE : Any> upgradeAndMoveModule(oldModule: Module<*, RUNTIME_KEY>, newNs: Namespace<nmUE, RUNTIME_KEY>, template: Module.Template<smUE>): Module<smUE, RUNTIME_KEY>
public fun <smUE : Any> upgradeModule(oldModule: Module<*, RK>, template: Module.Template<smUE>): Module<smUE, RK>
public fun <smUE : Any> upgradeAndMoveModule(oldModule: Module<*, RK>, newNs: Namespace<nmUE, RK>, template: Module.Template<smUE>): Module<smUE, RK>
public fun removeModule(oldModule: Module<*, RUNTIME_KEY>)
public fun <smUE : Any> removeModuleAfterUpgrade(oldModule: Module<smUE, RUNTIME_KEY>): Module<smUE, RUNTIME_KEY>
public fun removeModule(oldModule: Module<*, RK>)
public fun <smUE : Any> removeModuleAfterUpgrade(oldModule: Module<smUE, RK>): Module<smUE, RK>
public fun addStatementAfterUpgrade(stmt: RawStatement.Void2Void.ImplementationsProvider<*>)
public fun addStatementAfterUpgrade(stmt: _Statement.Void2Void<*, RUNTIME_KEY>)
public fun addStatementAfterUpgrade(stmt: _Statement.Void2Void<*, RK>)
@LowLevelApi
public fun <sUE : Any> _addStatementAfterUpgrade(stmt: RawStatement.Params2Void.ImplementationsProvider<sUE>): InputRow._Scope<sUE, Unit>
public fun <sUE : Any> _addStatementAfterUpgrade(stmt: RawStatement.Params2Void.ImplementationsProvider<sUE>): InputRow._Scope<sUE, RK, Unit>
@LowLevelApi
public fun <sUE : Any> _addStatementAfterUpgrade(stmt: _Statement.Params2Void<sUE, RUNTIME_KEY>): InputRow._Scope<sUE, Unit>
public fun <sUE : Any> _addStatementAfterUpgrade(stmt: _Statement.Params2Void<sUE, RK>): InputRow._Scope<sUE, RK, Unit>
}

View File

@ -2,29 +2,29 @@ package ru.landgrafhomyak.db.skeleton1.api.runtime
import kotlin.jvm.JvmName
import ru.landgrafhomyak.db.skeleton1.api.LowLevelApi
import ru.landgrafhomyak.db.skeleton1.api.statement.QueryParam
import ru.landgrafhomyak.db.skeleton1.api.statement.InputParam
public interface InputRow<qUE : Any> {
public interface InputRow<qUE : Any, RK : Any> {
@Suppress("INAPPLICABLE_JVM_NAME")
@get:JvmName("uExt")
public val uExt: qUE
public operator fun <RuntimeType> set(c: QueryParam<RuntimeType, qUE>, value: RuntimeType)
public operator fun <RuntimeType> set(c: InputParam<RuntimeType, qUE, RK>, value: RuntimeType)
public operator fun set(c: QueryParam<Byte, qUE>, value: Byte): Unit = this.set<Byte>(c, value)
public operator fun set(c: QueryParam<UByte, qUE>, value: UByte): Unit = this.set<UByte>(c, value)
public operator fun set(c: QueryParam<Short, qUE>, value: Short): Unit = this.set<Short>(c, value)
public operator fun set(c: QueryParam<UShort, qUE>, value: UShort): Unit = this.set<UShort>(c, value)
public operator fun set(c: QueryParam<Int, qUE>, value: Int): Unit = this.set<Int>(c, value)
public operator fun set(c: QueryParam<UInt, qUE>, value: UInt): Unit = this.set<UInt>(c, value)
public operator fun set(c: QueryParam<Long, qUE>, value: Long): Unit = this.set<Long>(c, value)
public operator fun set(c: QueryParam<ULong, qUE>, value: ULong): Unit = this.set<ULong>(c, value)
public operator fun set(c: QueryParam<Char, qUE>, value: Char): Unit = this.set<Char>(c, value)
public operator fun set(c: QueryParam<Boolean, qUE>, value: Boolean): Unit = this.set<Boolean>(c, value)
public operator fun set(c: InputParam<Byte, qUE, RK>, value: Byte): Unit = this.set<Byte>(c, value)
public operator fun set(c: InputParam<UByte, qUE, RK>, value: UByte): Unit = this.set<UByte>(c, value)
public operator fun set(c: InputParam<Short, qUE, RK>, value: Short): Unit = this.set<Short>(c, value)
public operator fun set(c: InputParam<UShort, qUE, RK>, value: UShort): Unit = this.set<UShort>(c, value)
public operator fun set(c: InputParam<Int, qUE, RK>, value: Int): Unit = this.set<Int>(c, value)
public operator fun set(c: InputParam<UInt, qUE, RK>, value: UInt): Unit = this.set<UInt>(c, value)
public operator fun set(c: InputParam<Long, qUE, RK>, value: Long): Unit = this.set<Long>(c, value)
public operator fun set(c: InputParam<ULong, qUE, RK>, value: ULong): Unit = this.set<ULong>(c, value)
public operator fun set(c: InputParam<Char, qUE, RK>, value: Char): Unit = this.set<Char>(c, value)
public operator fun set(c: InputParam<Boolean, qUE, RK>, value: Boolean): Unit = this.set<Boolean>(c, value)
@Suppress("ClassName")
@LowLevelApi
public interface _Scope<QueryUserExtension : Any, out Next> : InputRow<QueryUserExtension> {
public interface _Scope<qUE : Any, RK : Any, out Next> : InputRow<qUE, RK> {
@Suppress("FunctionName")
@LowLevelApi
public suspend fun _finish(): Next
@ -36,7 +36,7 @@ public interface InputRow<qUE : Any> {
@Suppress("ClassName")
@LowLevelApi
public interface _Iterator<QueryUserExtension : Any, out Next> : _Scope<QueryUserExtension, Next>, InputRow<QueryUserExtension> {
public interface _Iterator<qUE : Any, RK : Any, out Next> : _Scope<qUE, RK, Next>, InputRow<qUE, RK> {
@Suppress("FunctionName")
@LowLevelApi
public suspend fun _next(): Boolean

View File

@ -2,29 +2,30 @@ package ru.landgrafhomyak.db.skeleton1.api.runtime
import kotlin.jvm.JvmName
import ru.landgrafhomyak.db.skeleton1.api.LowLevelApi
import ru.landgrafhomyak.db.skeleton1.api.statement.OutputColumn
import ru.landgrafhomyak.db.skeleton1.api.table.Column
public interface OutputRow<qUE : Any> {
public interface OutputRow<qUE : Any, RK : Any> {
@Suppress("INAPPLICABLE_JVM_NAME")
@get:JvmName("uExt")
public val uExt: qUE
public operator fun <RuntimeType> get(c: Column<RuntimeType, qUE, *>): RuntimeType
public operator fun <RuntimeType> get(c: OutputColumn<RuntimeType, qUE, RK>): RuntimeType
public operator fun get(c: Column<Byte, qUE, *>): Byte = this.get<Byte>(c)
public operator fun get(c: Column<UByte, qUE, *>): UByte = this.get<UByte>(c)
public operator fun get(c: Column<Short, qUE, *>): Short = this.get<Short>(c)
public operator fun get(c: Column<UShort, qUE, *>): UShort = this.get<UShort>(c)
public operator fun get(c: Column<Int, qUE, *>): Int = this.get<Int>(c)
public operator fun get(c: Column<UInt, qUE, *>): UInt = this.get<UInt>(c)
public operator fun get(c: Column<Long, qUE, *>): Long = this.get<Long>(c)
public operator fun get(c: Column<ULong, qUE, *>): ULong = this.get<ULong>(c)
public operator fun get(c: Column<Char, qUE, *>): Char = this.get<Char>(c)
public operator fun get(c: Column<Boolean, qUE, *>): Boolean = this.get<Boolean>(c)
public operator fun get(c: OutputColumn<Byte, qUE, RK>): Byte = this.get<Byte>(c)
public operator fun get(c: OutputColumn<UByte, qUE, RK>): UByte = this.get<UByte>(c)
public operator fun get(c: OutputColumn<Short, qUE, RK>): Short = this.get<Short>(c)
public operator fun get(c: OutputColumn<UShort, qUE, RK>): UShort = this.get<UShort>(c)
public operator fun get(c: OutputColumn<Int, qUE, RK>): Int = this.get<Int>(c)
public operator fun get(c: OutputColumn<UInt, qUE, RK>): UInt = this.get<UInt>(c)
public operator fun get(c: OutputColumn<Long, qUE, RK>): Long = this.get<Long>(c)
public operator fun get(c: OutputColumn<ULong, qUE, RK>): ULong = this.get<ULong>(c)
public operator fun get(c: OutputColumn<Char, qUE, RK>): Char = this.get<Char>(c)
public operator fun get(c: OutputColumn<Boolean, qUE, RK>): Boolean = this.get<Boolean>(c)
@Suppress("ClassName")
@LowLevelApi
public interface _Scope<QueryUserExtension : Any, out Next> : OutputRow<QueryUserExtension> {
public interface _Scope<qUE : Any, RK : Any, out Next> : OutputRow<qUE, RK> {
@Suppress("FunctionName")
@LowLevelApi
public suspend fun _finish(): Next
@ -36,7 +37,7 @@ public interface OutputRow<qUE : Any> {
@Suppress("ClassName")
@LowLevelApi
public interface _Iterator<QueryUserExtension : Any, out Next> : _Scope<QueryUserExtension, Next>, OutputRow<QueryUserExtension> {
public interface _Iterator<qUE : Any, RK : Any, out Next> : _Scope<qUE, RK, Next>, OutputRow<qUE, RK> {
@Suppress("FunctionName")
@LowLevelApi
public suspend fun _next(): Boolean

View File

@ -3,40 +3,40 @@ package ru.landgrafhomyak.db.skeleton1.api.runtime
import ru.landgrafhomyak.db.skeleton1.api.LowLevelApi
import ru.landgrafhomyak.db.skeleton1.api.statement._Statement
public interface Transaction<RUNTIME_KEY : Any> {
public suspend fun <qUE : Any?> executeQuery_void2void(compiledQuery: _Statement.Void2Void<qUE, RUNTIME_KEY>)
public interface Transaction<RK : Any> {
public suspend fun <qUE : Any?> executeQuery_void2void(compiledQuery: _Statement.Void2Void<qUE, RK>)
@Suppress("FunctionName")
@LowLevelApi
public suspend fun <qUE : Any> _executeQuery_void2row(compiledQuery: _Statement.Void2Row<qUE, RUNTIME_KEY>): OutputRow._Scope<qUE, Unit>
public suspend fun <qUE : Any> _executeQuery_void2row(compiledQuery: _Statement.Void2Row<qUE, RK>): OutputRow._Scope<qUE, RK, Unit>
@Suppress("FunctionName")
@LowLevelApi
public suspend fun <qUE : Any> _executeQuery_void2rowOrNull(compiledQuery: _Statement.Void2RowOrNull<qUE, RUNTIME_KEY>): OutputRow._Scope<qUE, Unit>?
public suspend fun <qUE : Any> _executeQuery_void2rowOrNull(compiledQuery: _Statement.Void2RowOrNull<qUE, RK>): OutputRow._Scope<qUE, RK, Unit>?
@Suppress("FunctionName")
@LowLevelApi
public suspend fun <qUE : Any> _executeQuery_void2table(compiledQuery: _Statement.Void2RowOrNull<qUE, RUNTIME_KEY>): OutputRow._Iterator<qUE, Unit>
public suspend fun <qUE : Any> _executeQuery_void2table(compiledQuery: _Statement.Void2RowOrNull<qUE, RK>): OutputRow._Iterator<qUE, RK, Unit>
@Suppress("FunctionName")
@LowLevelApi
public suspend fun <qUE : Any> _executeQuery_params2void(compiledQuery: _Statement.Void2Void<qUE, RUNTIME_KEY>): InputRow._Scope<qUE, Unit>
public suspend fun <qUE : Any> _executeQuery_params2void(compiledQuery: _Statement.Void2Void<qUE, RK>): InputRow._Scope<qUE, RK, Unit>
@Suppress("FunctionName")
@LowLevelApi
public suspend fun <qUE : Any> _executeQuery_params2row(compiledQuery: _Statement.Void2Row<qUE, RUNTIME_KEY>): InputRow._Scope<qUE, OutputRow._Scope<qUE, Unit>>
public suspend fun <qUE : Any> _executeQuery_params2row(compiledQuery: _Statement.Void2Row<qUE, RK>): InputRow._Scope<qUE, RK, OutputRow._Scope<qUE, RK, Unit>>
@Suppress("FunctionName")
@LowLevelApi
public suspend fun <qUE : Any> _executeQuery_params2rowOrNull(compiledQuery: _Statement.Void2RowOrNull<qUE, RUNTIME_KEY>):InputRow._Scope<qUE, OutputRow._Scope<qUE, Unit>?>
public suspend fun <qUE : Any> _executeQuery_params2rowOrNull(compiledQuery: _Statement.Void2RowOrNull<qUE, RK>): InputRow._Scope<qUE, RK, OutputRow._Scope<qUE, RK, Unit>?>
@Suppress("FunctionName")
@LowLevelApi
public suspend fun <qUE : Any> _executeQuery_params2table(compiledQuery: _Statement.Void2RowOrNull<qUE, RUNTIME_KEY>): InputRow._Scope<qUE, OutputRow._Iterator<qUE, Unit>>
public suspend fun <qUE : Any> _executeQuery_params2table(compiledQuery: _Statement.Void2RowOrNull<qUE, RK>): InputRow._Scope<qUE, RK, OutputRow._Iterator<qUE, RK, Unit>>
@Suppress("FunctionName")
@LowLevelApi
public suspend fun <qUE : Any> _executeBatch_params2void(compiledQuery: _Statement.Void2Void<qUE, RUNTIME_KEY>): InputRow._Iterator<qUE, Unit>
public suspend fun <qUE : Any> _executeBatch_params2void(compiledQuery: _Statement.Void2Void<qUE, RK>): InputRow._Iterator<qUE, RK, Unit>
public suspend fun rollback()

View File

@ -3,9 +3,14 @@ package ru.landgrafhomyak.db.skeleton1.api.statement
import kotlin.jvm.JvmName
import ru.landgrafhomyak.db.skeleton1.api.DebugApi
public interface QueryParam<RT, oqUE : Any> {
public interface InputParam<@Suppress("unused") RT, oqUE : Any, RK : Any> {
@DebugApi
@Suppress("INAPPLICABLE_JVM_NAME")
@get:JvmName("getName")
public val name: String
@DebugApi
@Suppress("INAPPLICABLE_JVM_NAME")
@get:JvmName("getStatement")
public val statement: _Statement<oqUE, RK>
}

View File

@ -0,0 +1,16 @@
package ru.landgrafhomyak.db.skeleton1.api.statement
import kotlin.jvm.JvmName
import ru.landgrafhomyak.db.skeleton1.api.DebugApi
public interface OutputColumn<@Suppress("unused") RT, oqUE : Any, RK : Any> {
@DebugApi
@Suppress("INAPPLICABLE_JVM_NAME")
@get:JvmName("name")
public val name: String
@DebugApi
@Suppress("INAPPLICABLE_JVM_NAME")
@get:JvmName("getStatement")
public val statement: _Statement<oqUE, RK>
}

View File

@ -7,22 +7,22 @@ import ru.landgrafhomyak.db.skeleton1.api.statement._Statement
import ru.landgrafhomyak.db.skeleton1.api.runtime.InputRow
public interface TableConstructor<tUE : Any, RUNTIME_KEY : Any> {
public fun createTable(context: Scope<tUE, RUNTIME_KEY>): tUE
public interface TableConstructor<tUE : Any, RK : Any> {
public fun createTable(context: Scope<tUE, RK>): tUE
public interface Scope<tUE : Any, RUNTIME_KEY : Any> {
public fun <RT> column(name: String, type: DatabaseType.ImplementationsProvider<RT>, manualCreate: Boolean = false): Column<RT, tUE, RUNTIME_KEY>
public fun <RT, ttUE : Any> columnWithBoundType(name: String, foreign: Column<RT, ttUE, RUNTIME_KEY>): Column<RT, tUE, RUNTIME_KEY>
public interface Scope<tUE : Any, RK : Any> {
public fun <RT> column(name: String, type: DatabaseType.ImplementationsProvider<RT>, manualCreate: Boolean = false): Column<RT, tUE, RK>
public fun <RT, ttUE : Any> columnWithBoundType(name: String, foreign: Column<RT, ttUE, RK>): Column<RT, tUE, RK>
public fun tableScopedObject(name: String): TableScopedObject<tUE, RUNTIME_KEY>
public fun tableScopedObject(name: String): TableScopedObject<tUE, RK>
public fun addAlterStatement(stmt: _Statement.Void2Void<*, RUNTIME_KEY>)
public fun addAlterStatement(stmt: _Statement.Void2Void<*, RK>)
public fun addAlterStatement(stmt: RawStatement.Void2Void.ImplementationsProvider<*>)
@LowLevelApi
public fun <sUE : Any> _addAlterStatement(stmt: _Statement.Void2Void<sUE, RUNTIME_KEY>): InputRow._Scope<sUE, Unit>
public fun <sUE : Any> _addAlterStatement(stmt: _Statement.Void2Void<sUE, RK>): InputRow._Scope<sUE, RK, Unit>
@LowLevelApi
public fun <sUE : Any> _addAlterStatement(stmt: RawStatement.Params2Void.ImplementationsProvider<sUE>): InputRow._Scope<sUE, Unit>
public fun <sUE : Any> _addAlterStatement(stmt: RawStatement.Params2Void.ImplementationsProvider<sUE>): InputRow._Scope<sUE, RK, Unit>
}
}

View File

@ -6,34 +6,34 @@ import ru.landgrafhomyak.db.skeleton1.api.statement._Statement
import ru.landgrafhomyak.db.skeleton1.api.runtime.InputRow
public interface TableUpgrade<tnUE : Any, toUE : Any, RUNTIME_KEY : Any> {
public fun upgradeTable(oldTable: toUE, context: Scope<tnUE, toUE, RUNTIME_KEY>): tnUE
public interface TableUpgrade<tnUE : Any, toUE : Any, RK : Any> {
public fun upgradeTable(oldTable: toUE, context: Scope<tnUE, toUE, RK>): tnUE
public interface Scope<tnUE : Any, toUE : Any, RUNTIME_KEY : Any> : TableConstructor.Scope<tnUE, RUNTIME_KEY> {
public fun <RT> keepColumn(c: Column<RT, toUE, RUNTIME_KEY>): Column<RT, tnUE, RUNTIME_KEY>
public fun <RT> renameColumn(c: Column<RT, toUE, RUNTIME_KEY>, newName: String): Column<RT, tnUE, RUNTIME_KEY>
public fun removeColumn(c: Column<*, toUE, RUNTIME_KEY>)
public fun <RT> removeColumnAfterUpgrade(c: Column<RT, toUE, RUNTIME_KEY>): Column<RT, tnUE, RUNTIME_KEY>
public interface Scope<tnUE : Any, toUE : Any, RK : Any> : TableConstructor.Scope<tnUE, RK> {
public fun <RT> keepColumn(c: Column<RT, toUE, RK>): Column<RT, tnUE, RK>
public fun <RT> renameColumn(c: Column<RT, toUE, RK>, newName: String): Column<RT, tnUE, RK>
public fun removeColumn(c: Column<*, toUE, RK>)
public fun <RT> removeColumnAfterUpgrade(c: Column<RT, toUE, RK>): Column<RT, tnUE, RK>
public fun <RT> keepColumnWithBoundType(c: Column<RT, toUE, RUNTIME_KEY>): Column<RT, tnUE, RUNTIME_KEY>
public fun <RT> unbindAndKeepColumnWithBoundType(c: Column<RT, toUE, RUNTIME_KEY>): Column<RT, tnUE, RUNTIME_KEY>
public fun <RT> renameColumnWithBoundType(c: Column<RT, toUE, RUNTIME_KEY>, newName: String): Column<RT, tnUE, RUNTIME_KEY>
public fun <RT> unbindAndRenameColumnWithBoundType(c: Column<RT, toUE, RUNTIME_KEY>, newName: String): Column<RT, tnUE, RUNTIME_KEY>
public fun removeColumnWithBoundType(c: Column<*, toUE, RUNTIME_KEY>)
public fun <RT> removeColumnWithBoundTypeAfterUpgrade(c: Column<RT, toUE, RUNTIME_KEY>): Column<RT, tnUE, RUNTIME_KEY>
public fun <RT> keepColumnWithBoundType(c: Column<RT, toUE, RK>): Column<RT, tnUE, RK>
public fun <RT> unbindAndKeepColumnWithBoundType(c: Column<RT, toUE, RK>): Column<RT, tnUE, RK>
public fun <RT> renameColumnWithBoundType(c: Column<RT, toUE, RK>, newName: String): Column<RT, tnUE, RK>
public fun <RT> unbindAndRenameColumnWithBoundType(c: Column<RT, toUE, RK>, newName: String): Column<RT, tnUE, RK>
public fun removeColumnWithBoundType(c: Column<*, toUE, RK>)
public fun <RT> removeColumnWithBoundTypeAfterUpgrade(c: Column<RT, toUE, RK>): Column<RT, tnUE, RK>
public fun keepTableScopedObject(obj: TableScopedObject<toUE, RUNTIME_KEY>): TableScopedObject<tnUE, RUNTIME_KEY>
public fun renameTableScopedObject(obj: TableScopedObject<toUE, RUNTIME_KEY>, newName: String): TableScopedObject<tnUE, RUNTIME_KEY>
public fun removeTableScopedObject(obj: TableScopedObject<toUE, RUNTIME_KEY>): TableScopedObject<tnUE, RUNTIME_KEY>
public fun keepTableScopedObject(obj: TableScopedObject<toUE, RK>): TableScopedObject<tnUE, RK>
public fun renameTableScopedObject(obj: TableScopedObject<toUE, RK>, newName: String): TableScopedObject<tnUE, RK>
public fun removeTableScopedObject(obj: TableScopedObject<toUE, RK>): TableScopedObject<tnUE, RK>
public fun addAlterStatementAfterUpgrade(stmt: _Statement.Void2Void<*, RUNTIME_KEY>)
public fun addAlterStatementAfterUpgrade(stmt: _Statement.Void2Void<*, RK>)
public fun addAlterStatementAfterUpgrade(stmt: RawStatement.Void2Void.ImplementationsProvider<*>)
@LowLevelApi
public fun <sUE : Any> _addAlterStatementAfterUpgrade(stmt: _Statement.Params2Void<sUE, RUNTIME_KEY>): InputRow._Scope<sUE, Unit>
public fun <sUE : Any> _addAlterStatementAfterUpgrade(stmt: _Statement.Params2Void<sUE, RK>): InputRow._Scope<sUE, RK, Unit>
@LowLevelApi
public fun <sUE : Any> _addAlterStatementAfterUpgrade(stmt: RawStatement.Params2Void.ImplementationsProvider<sUE>): InputRow._Scope<sUE, Unit>
public fun <sUE : Any> _addAlterStatementAfterUpgrade(stmt: RawStatement.Params2Void.ImplementationsProvider<sUE>): InputRow._Scope<sUE, RK, Unit>
}
}