Renamed module scopes
This commit is contained in:
parent
633d137bf0
commit
cae5567d9d
@ -27,7 +27,7 @@ public interface Module<mUE : Any, RUNTIME_KEY : Any> {
|
||||
@get:JvmName("versionKey")
|
||||
public val versionKey: String
|
||||
|
||||
public fun createSchema(context: CreateModuleScope<mUE, RUNTIME_KEY>): mUE
|
||||
public fun createSchema(context: ModuleConstructorScope<mUE, RUNTIME_KEY>): mUE
|
||||
|
||||
public suspend fun initData(ext: mUE, compiler: QueriesCompiler<RUNTIME_KEY>, transaction: Transaction<RUNTIME_KEY>) {}
|
||||
}
|
||||
@ -37,7 +37,7 @@ public interface Module<mUE : Any, RUNTIME_KEY : Any> {
|
||||
@get:JvmName("versionKey")
|
||||
public val versionKey: String
|
||||
|
||||
public fun upgradeSchema(context: UpgradeModuleScope<nmUE, omUE, RUNTIME_KEY>): nmUE
|
||||
public fun upgradeSchema(context: ModuleUpgradeScope<nmUE, omUE, RUNTIME_KEY>): nmUE
|
||||
|
||||
public suspend fun upgradeData(ext: nmUE, compiler: QueriesCompiler<RUNTIME_KEY>, transaction: Transaction<RUNTIME_KEY>) {}
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ import ru.landgrafhomyak.db.skeleton1.api.table.Table
|
||||
import ru.landgrafhomyak.db.skeleton1.api.runtime.InputRow
|
||||
|
||||
|
||||
public interface CreateModuleScope<mUE : Any, RK : Any> {
|
||||
public interface ModuleConstructorScope<mUE : Any, RK : Any> {
|
||||
@Suppress("INAPPLICABLE_JVM_NAME")
|
||||
@get:JvmName("rootNs")
|
||||
public val rootNs: Namespace<mUE, RK>
|
@ -7,7 +7,7 @@ import ru.landgrafhomyak.db.skeleton1.api.runtime.InputRow
|
||||
import ru.landgrafhomyak.db.skeleton1.api.table.Table
|
||||
|
||||
|
||||
public interface UpgradeModuleScope<nmUE : Any, omUE : Any, RK : Any> : CreateModuleScope<nmUE, RK> {
|
||||
public interface ModuleUpgradeScope<nmUE : Any, omUE : Any, RK : Any> : ModuleConstructorScope<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, RK>, newName: String): Table<tUE, nmUE, RK>
|
Loading…
Reference in New Issue
Block a user