Temp tables can be created through a module object

This commit is contained in:
Andrew Golovashevich 2025-02-23 14:21:41 +03:00
parent 77f32fc5b6
commit c88ec6d232
2 changed files with 6 additions and 2 deletions

View File

@ -3,6 +3,8 @@ package ru.landgrafhomyak.db.serdha0.api.module
import kotlin.jvm.JvmName
import ru.landgrafhomyak.db.serdha0.api.queries._Query
import ru.landgrafhomyak.db.serdha0.api.runtime.Executor
import ru.landgrafhomyak.db.serdha0.api.table.Table
import ru.landgrafhomyak.db.serdha0.api.table.TableConstructor
public interface Module<mUE : Any> {
@ -16,6 +18,10 @@ public interface Module<mUE : Any> {
public fun <R : Any> createQuery(c: _Query.Constructor<R>): R
public fun <tUE : Any> createSessionScopeTemporaryTable(name: String, initializer: TableConstructor<tUE>): Table<tUE, Nothing>
public fun <tUE : Any> createTransactionScopeTemporaryTable(name: String, initializer: TableConstructor<tUE>): Table<tUE, Nothing>
@Suppress("INAPPLICABLE_JVM_NAME")
@get:JvmName("executor")
public val executor: Executor

View File

@ -42,7 +42,5 @@ public interface UpgradeModuleScope<omUE : Any> : CreateModuleScope {
public fun deleteTableAfterModuleUpgraded(table: Table<*, *>)
public fun <tUE : Any> createModuleUpgradeScopeTemporaryTable(namespace: Namespace, name: String, initializer: TableConstructor<tUE>): Table<tUE, Nothing>
public fun <smUE : Any> upgradeModule(oldModule: Module<*>, rootNs: Namespace, template: ModuleTemplate<smUE>): Module<smUE>
}