From c88ec6d232616bb4b1cfaa9786f997fa88d2964d Mon Sep 17 00:00:00 2001 From: Andrew Golovashevich Date: Sun, 23 Feb 2025 14:21:41 +0300 Subject: [PATCH] Temp tables can be created through a module object --- .../ru/landgrafhomyak/db/serdha0/api/module/Module.kt | 6 ++++++ .../db/serdha0/api/module/UpgradeModuleScope.kt | 2 -- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/commonMain/kotlin/ru/landgrafhomyak/db/serdha0/api/module/Module.kt b/src/commonMain/kotlin/ru/landgrafhomyak/db/serdha0/api/module/Module.kt index 127f0c0..14cd959 100644 --- a/src/commonMain/kotlin/ru/landgrafhomyak/db/serdha0/api/module/Module.kt +++ b/src/commonMain/kotlin/ru/landgrafhomyak/db/serdha0/api/module/Module.kt @@ -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 { @@ -16,6 +18,10 @@ public interface Module { public fun createQuery(c: _Query.Constructor): R + public fun createSessionScopeTemporaryTable(name: String, initializer: TableConstructor): Table + + public fun createTransactionScopeTemporaryTable(name: String, initializer: TableConstructor): Table + @Suppress("INAPPLICABLE_JVM_NAME") @get:JvmName("executor") public val executor: Executor diff --git a/src/commonMain/kotlin/ru/landgrafhomyak/db/serdha0/api/module/UpgradeModuleScope.kt b/src/commonMain/kotlin/ru/landgrafhomyak/db/serdha0/api/module/UpgradeModuleScope.kt index 37b91e5..ec7ece4 100644 --- a/src/commonMain/kotlin/ru/landgrafhomyak/db/serdha0/api/module/UpgradeModuleScope.kt +++ b/src/commonMain/kotlin/ru/landgrafhomyak/db/serdha0/api/module/UpgradeModuleScope.kt @@ -42,7 +42,5 @@ public interface UpgradeModuleScope : CreateModuleScope { public fun deleteTableAfterModuleUpgraded(table: Table<*, *>) - public fun createModuleUpgradeScopeTemporaryTable(namespace: Namespace, name: String, initializer: TableConstructor): Table - public fun upgradeModule(oldModule: Module<*>, rootNs: Namespace, template: ModuleTemplate): Module } \ No newline at end of file