Missed module upgrade operations and fixes
This commit is contained in:
parent
cae5567d9d
commit
50dece2624
@ -20,18 +20,21 @@ public interface ModuleConstructorScope<mUE : Any, RK : Any> {
|
|||||||
name: String, initializer: Table.Constructor<tUE, RK>
|
name: String, initializer: Table.Constructor<tUE, RK>
|
||||||
): Table<tUE, mUE, RK>
|
): Table<tUE, mUE, RK>
|
||||||
|
|
||||||
public fun <oUE : Any?> moduleScopedObject(namespace: Namespace<mUE, RK> = this.rootNs, name: String, metadata: ObjectOperations.ImplementationsProvider<oUE>): ModuleScopedObject<oUE, mUE, RK>
|
public fun <oUE : Any?> moduleScopedObject(
|
||||||
|
namespace: Namespace<mUE, RK> = this.rootNs,
|
||||||
|
name: String, metadata: ObjectOperations.ImplementationsProvider<oUE>
|
||||||
|
): ModuleScopedObject<oUE, mUE, RK>
|
||||||
|
|
||||||
public fun <mUE : Any> substituteModule(rootNs: Namespace<mUE, RK>, template: Module.Template<mUE>): Module<mUE, RK>
|
public fun <mUE : Any> substituteModule(rootNs: Namespace<mUE, RK>, template: Module.Template<mUE>): Module<mUE, RK>
|
||||||
|
|
||||||
public fun namespace(parent: Namespace<mUE, RK>, name: String): Namespace<mUE, RK>
|
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<*, RK>)
|
public fun addStatement(stmt: _Statement.Void2Void<*, RK>)
|
||||||
|
public fun addStatement(stmt: RawStatement.Void2Void.ImplementationsProvider<*>)
|
||||||
@LowLevelApi
|
|
||||||
public fun <sUE : Any> _addStatement(stmt: RawStatement.Params2Void.ImplementationsProvider<sUE>): InputRow._Scope<sUE, RK, Unit>
|
|
||||||
|
|
||||||
@LowLevelApi
|
@LowLevelApi
|
||||||
public fun <sUE : Any> _addStatement(stmt: _Statement.Params2Void<sUE, RK>): InputRow._Scope<sUE, RK, Unit>
|
public fun <sUE : Any> _addStatement(stmt: _Statement.Params2Void<sUE, RK>): InputRow._Scope<sUE, RK, Unit>
|
||||||
|
|
||||||
|
@LowLevelApi
|
||||||
|
public fun <sUE : Any> _addStatement(stmt: RawStatement.Params2Void.ImplementationsProvider<sUE>): InputRow._Scope<sUE, RK, Unit>
|
||||||
}
|
}
|
@ -8,65 +8,93 @@ import ru.landgrafhomyak.db.skeleton1.api.table.Table
|
|||||||
|
|
||||||
|
|
||||||
public interface ModuleUpgradeScope<nmUE : Any, omUE : Any, RK : Any> : ModuleConstructorScope<nmUE, RK> {
|
public interface ModuleUpgradeScope<nmUE : Any, omUE : Any, RK : Any> : ModuleConstructorScope<nmUE, RK> {
|
||||||
|
// Table -------------------------------------------------------------------
|
||||||
public fun <tUE : Any> keepTable(table: Table<tUE, omUE, RK>): Table<tUE, 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>,
|
||||||
|
newNamespace: Namespace<nmUE, RK>? = null, newName: String
|
||||||
|
): Table<tUE, nmUE, RK>
|
||||||
|
|
||||||
public fun <tUE : Any> keepAndRenameTable(table: Table<tUE, omUE, RK>, newName: String): Table<tUE, nmUE, RK>
|
public fun <ntUE : Any, otUE : Any> upgradeTable(
|
||||||
public fun <tUE : Any> keepAndRenameTable(table: Table<tUE, omUE, RK>, newNamespace: Namespace<nmUE, RK>): Table<tUE, nmUE, RK>
|
oldTable: Table<otUE, omUE, 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, RK>, upgrade: Table.Upgrade<ntUE, otUE, RK>): Table<ntUE, nmUE, RK>
|
|
||||||
public fun <ntUE : Any, otUE : Any> upgradeAndRenameTable(
|
|
||||||
table: Table<otUE, omUE, RK>,
|
|
||||||
newName: String,
|
|
||||||
upgrade: Table.Upgrade<ntUE, otUE, RK>
|
upgrade: Table.Upgrade<ntUE, otUE, RK>
|
||||||
): Table<ntUE, nmUE, RK>
|
): Table<ntUE, nmUE, RK>
|
||||||
|
|
||||||
public fun <ntUE : Any, otUE : Any> upgradeAndRenameTable(
|
public fun <ntUE : Any, otUE : Any> upgradeAndRenameTable(
|
||||||
table: Table<otUE, omUE, RK>,
|
table: Table<otUE, omUE, RK>,
|
||||||
newNamespace: Namespace<nmUE, RK>,
|
newNamespace: Namespace<nmUE, RK>? = null, newName: String,
|
||||||
upgrade: Table.Upgrade<ntUE, otUE, RK>
|
upgrade: Table.Upgrade<ntUE, otUE, RK>
|
||||||
): Table<ntUE, nmUE, RK>
|
): Table<ntUE, nmUE, RK>
|
||||||
|
|
||||||
public fun <ntUE : Any, otUE : Any> upgradeAndRenameTable(
|
|
||||||
table: Table<otUE, omUE, RK>,
|
|
||||||
newNamespace: Namespace<nmUE, RK>,
|
|
||||||
upgrade: Table.Upgrade<ntUE, otUE, RK>,
|
|
||||||
newName: String
|
|
||||||
): Table<ntUE, nmUE, RK>
|
|
||||||
|
|
||||||
public fun deleteTable(table: Table<*, omUE, RK>)
|
public fun deleteTable(table: Table<*, omUE, RK>)
|
||||||
|
|
||||||
public fun <tUE : Any> deleteTableAfterModuleUpgrade(table: Table<tUE, omUE, RK>): Table<tUE, nmUE, RK>
|
public fun <tUE : Any> deleteTableAfterModuleUpgrade(table: Table<tUE, omUE, RK>): Table<tUE, nmUE, RK>
|
||||||
|
|
||||||
public fun exportTable(table: Table<*, omUE, RK>)
|
public fun exportTable(table: Table<*, omUE, RK>)
|
||||||
|
|
||||||
public fun <tUE : Any> importTable(
|
public fun <tUE : Any> importTable(
|
||||||
namespace: Namespace<nmUE, RK> = this.rootNs, name: String,
|
table: Table<tUE, *, RK>,
|
||||||
table: Table<tUE, *, RK>
|
namespace: Namespace<nmUE, RK> = this.rootNs, name: String
|
||||||
): Table<tUE, nmUE, RK>
|
): Table<tUE, nmUE, RK>
|
||||||
|
|
||||||
public fun <ntUE : Any, otUE : Any> importAndUpgradeTable(
|
public fun <ntUE : Any, otUE : Any> importAndUpgradeTable(
|
||||||
namespace: Namespace<nmUE, RK> = this.rootNs, name: String,
|
|
||||||
table: Table<otUE, *, RK>,
|
table: Table<otUE, *, RK>,
|
||||||
|
namespace: Namespace<nmUE, RK> = this.rootNs, name: String,
|
||||||
upgrade: Table.Upgrade<ntUE, otUE, RK>
|
upgrade: Table.Upgrade<ntUE, otUE, RK>
|
||||||
): Table<ntUE, nmUE, RK>
|
): Table<ntUE, nmUE, RK>
|
||||||
|
|
||||||
|
// Object ------------------------------------------------------------------
|
||||||
|
|
||||||
|
public fun <oUE : Any?> keepModuleScopedObject(obj: ModuleScopedObject<oUE, omUE, RK>): ModuleScopedObject<oUE, nmUE, RK>
|
||||||
|
public fun <oUE : Any?> renameModuleScopedObject(
|
||||||
|
obj: ModuleScopedObject<oUE, omUE, RK>,
|
||||||
|
newNamespace: Namespace<nmUE, RK>? = null, newName: String
|
||||||
|
): ModuleScopedObject<oUE, nmUE, RK>
|
||||||
|
|
||||||
|
public fun <oUE : Any?> deleteModuleScopedObject(obj: ModuleScopedObject<oUE, omUE, RK>)
|
||||||
|
public fun <oUE : Any?> deleteModuleScopedObjectAfterModuleUpgrade(obj: ModuleScopedObject<oUE, omUE, RK>): ModuleScopedObject<oUE, nmUE, RK>
|
||||||
|
|
||||||
|
public fun exportModuleScopedObject(obj: ModuleScopedObject<*, omUE, RK>)
|
||||||
|
public fun <oUE : Any> importModuleScopedObject(
|
||||||
|
obj: ModuleScopedObject<oUE, *, RK>,
|
||||||
|
namespace: Namespace<nmUE, RK> = this.rootNs, name: String
|
||||||
|
): ModuleScopedObject<oUE, nmUE, RK>
|
||||||
|
|
||||||
|
|
||||||
|
// Module ------------------------------------------------------------------
|
||||||
|
|
||||||
public fun <smUE : Any> keepModule(module: Module<smUE, RK>): Module<smUE, RK>
|
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> keepAndMoveModule(oldModule: Module<smUE, RK>, newNs: Namespace<nmUE, RK>): Module<smUE, RK>
|
||||||
|
|
||||||
public fun <smUE : Any> upgradeModule(oldModule: Module<*, RK>, template: Module.Template<smUE>): Module<smUE, RK>
|
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 <smUE : Any> upgradeAndMoveModule(
|
||||||
|
oldModule: Module<*, RK>,
|
||||||
|
newNamespace: Namespace<nmUE, RK>,
|
||||||
|
template: Module.Template<smUE>
|
||||||
|
): Module<smUE, RK>
|
||||||
|
|
||||||
public fun removeModule(oldModule: Module<*, RK>)
|
public fun deleteModule(oldModule: Module<*, RK>)
|
||||||
public fun <smUE : Any> removeModuleAfterUpgrade(oldModule: Module<smUE, RK>): Module<smUE, RK>
|
public fun <smUE : Any> deleteModuleAfterUpgrade(oldModule: Module<smUE, RK>): Module<smUE, RK>
|
||||||
|
|
||||||
|
public fun exportModule(table: Module<*, RK>)
|
||||||
|
|
||||||
|
public fun <smUE : Any> importModule(
|
||||||
|
module: Module<smUE, RK>,
|
||||||
|
namespace: Namespace<nmUE, RK>,
|
||||||
|
): Module<smUE, RK>
|
||||||
|
|
||||||
|
public fun <nsmUE : Any, osmUE : Any> importAndUpgradeModule(
|
||||||
|
module: Module<osmUE, RK>,
|
||||||
|
namespace: Namespace<nmUE, RK>,
|
||||||
|
upgrade: Module.Upgrade<osmUE, nsmUE, RK>
|
||||||
|
): Module<nsmUE, RK>
|
||||||
|
|
||||||
|
// Statements --------------------------------------------------------------
|
||||||
|
|
||||||
public fun addStatementAfterUpgrade(stmt: RawStatement.Void2Void.ImplementationsProvider<*>)
|
|
||||||
public fun addStatementAfterUpgrade(stmt: _Statement.Void2Void<*, RK>)
|
public fun addStatementAfterUpgrade(stmt: _Statement.Void2Void<*, RK>)
|
||||||
|
public fun addStatementAfterUpgrade(stmt: RawStatement.Void2Void.ImplementationsProvider<*>)
|
||||||
@LowLevelApi
|
|
||||||
public fun <sUE : Any> _addStatementAfterUpgrade(stmt: RawStatement.Params2Void.ImplementationsProvider<sUE>): InputRow._Scope<sUE, RK, Unit>
|
|
||||||
|
|
||||||
@LowLevelApi
|
@LowLevelApi
|
||||||
public fun <sUE : Any> _addStatementAfterUpgrade(stmt: _Statement.Params2Void<sUE, RK>): InputRow._Scope<sUE, RK, Unit>
|
public fun <sUE : Any> _addStatementAfterUpgrade(stmt: _Statement.Params2Void<sUE, RK>): InputRow._Scope<sUE, RK, Unit>
|
||||||
|
|
||||||
|
@LowLevelApi
|
||||||
|
public fun <sUE : Any> _addStatementAfterUpgrade(stmt: RawStatement.Params2Void.ImplementationsProvider<sUE>): InputRow._Scope<sUE, RK, Unit>
|
||||||
}
|
}
|
@ -9,20 +9,19 @@ import ru.landgrafhomyak.db.skeleton1.api.runtime.InputRow
|
|||||||
public interface TableUpgradeScope<tnUE : Any, toUE : Any, RK : Any> : TableConstructorScope<tnUE, RK> {
|
public interface TableUpgradeScope<tnUE : Any, toUE : Any, RK : Any> : TableConstructorScope<tnUE, RK> {
|
||||||
public fun <RT> keepColumn(c: Column<RT, toUE, RK>): Column<RT, 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 <RT> renameColumn(c: Column<RT, toUE, RK>, newName: String): Column<RT, tnUE, RK>
|
||||||
public fun removeColumn(c: Column<*, toUE, RK>)
|
public fun deleteColumn(c: Column<*, toUE, RK>)
|
||||||
public fun <RT> removeColumnAfterUpgrade(c: Column<RT, toUE, RK>): Column<RT, tnUE, RK>
|
public fun <RT> deleteColumnAfterUpgrade(c: Column<RT, toUE, RK>): Column<RT, tnUE, RK>
|
||||||
|
|
||||||
public fun <RT> keepColumnWithBoundType(c: Column<RT, toUE, RK>): Column<RT, tnUE, RK>
|
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> 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> 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 <RT> unbindAndRenameColumnWithBoundType(c: Column<RT, toUE, RK>, newName: String): Column<RT, tnUE, RK>
|
||||||
public fun removeColumnWithBoundType(c: Column<*, toUE, RK>)
|
public fun deleteColumnWithBoundType(c: Column<*, toUE, RK>)
|
||||||
public fun <RT> removeColumnWithBoundTypeAfterUpgrade(c: Column<RT, toUE, RK>): Column<RT, tnUE, RK>
|
public fun <RT> deleteColumnWithBoundTypeAfterUpgrade(c: Column<RT, toUE, RK>): Column<RT, tnUE, RK>
|
||||||
|
|
||||||
public fun <oUE : Any?> keepTableScopedObject(obj: TableScopedObject<oUE, toUE, RK>): TableScopedObject<oUE, tnUE, RK>
|
public fun <oUE : Any?> keepTableScopedObject(obj: TableScopedObject<oUE, toUE, RK>): TableScopedObject<oUE, tnUE, RK>
|
||||||
public fun <oUE : Any?> renameTableScopedObject(obj: TableScopedObject<oUE, toUE, RK>, newName: String): TableScopedObject<oUE, tnUE, RK>
|
public fun <oUE : Any?> renameTableScopedObject(obj: TableScopedObject<oUE, toUE, RK>, newName: String): TableScopedObject<oUE, tnUE, RK>
|
||||||
public fun <oUE : Any?> removeTableScopedObject(obj: TableScopedObject<oUE, toUE, RK>): TableScopedObject<oUE, tnUE, RK>
|
public fun <oUE : Any?> deleteTableScopedObject(obj: TableScopedObject<oUE, toUE, RK>): TableScopedObject<oUE, tnUE, RK>
|
||||||
|
|
||||||
|
|
||||||
public fun addAlterStatementAfterUpgrade(stmt: _Statement.Void2Void<*, RK>)
|
public fun addAlterStatementAfterUpgrade(stmt: _Statement.Void2Void<*, RK>)
|
||||||
public fun addAlterStatementAfterUpgrade(stmt: RawStatement.Void2Void.ImplementationsProvider<*>)
|
public fun addAlterStatementAfterUpgrade(stmt: RawStatement.Void2Void.ImplementationsProvider<*>)
|
||||||
|
Loading…
Reference in New Issue
Block a user