'DebugApi' opt-in with some additional properties and 'RUNTIME_KEY' generic in module descriptor
This commit is contained in:
parent
ac4ff46640
commit
1e8cc55db0
@ -0,0 +1,6 @@
|
||||
package ru.landgrafhomyak.db.sql_skeleton_0.api
|
||||
|
||||
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY)
|
||||
@Retention(AnnotationRetention.BINARY)
|
||||
@RequiresOptIn
|
||||
public annotation class DebugApi
|
@ -1,18 +1,22 @@
|
||||
package ru.landgrafhomyak.db.sql_skeleton_0.api.misc
|
||||
|
||||
import kotlin.jvm.JvmName
|
||||
import ru.landgrafhomyak.db.sql_skeleton_0.api.DebugApi
|
||||
import ru.landgrafhomyak.db.sql_skeleton_0.api.table.Table
|
||||
|
||||
public interface Column<RUNTIME_TYPE, TABLE_USER_EXTENSION : Any, RUNTIME_KEY : Any> {
|
||||
@DebugApi
|
||||
@Suppress("INAPPLICABLE_JVM_NAME")
|
||||
@get:JvmName("name")
|
||||
public val name: String
|
||||
|
||||
@DebugApi
|
||||
@Suppress("INAPPLICABLE_JVM_NAME")
|
||||
@get:JvmName("type")
|
||||
public val type: DatabaseType<RUNTIME_TYPE>
|
||||
|
||||
@Suppress("INAPPLICABLE_JVM_NAME", "PropertyName")
|
||||
@get:JvmName("_getOwner")
|
||||
public val _owner: Table<TABLE_USER_EXTENSION, *, RUNTIME_KEY>
|
||||
@DebugApi
|
||||
@Suppress("INAPPLICABLE_JVM_NAME")
|
||||
@get:JvmName("getTable")
|
||||
public val table: Table<TABLE_USER_EXTENSION, *, RUNTIME_KEY>
|
||||
}
|
@ -1,8 +1,10 @@
|
||||
package ru.landgrafhomyak.db.sql_skeleton_0.api.misc
|
||||
|
||||
import kotlin.jvm.JvmName
|
||||
import ru.landgrafhomyak.db.sql_skeleton_0.api.DebugApi
|
||||
|
||||
public interface QueryParam<RT, oqUE : Any> {
|
||||
@DebugApi
|
||||
@Suppress("INAPPLICABLE_JVM_NAME")
|
||||
@get:JvmName("getName")
|
||||
public val name: String
|
||||
|
@ -23,12 +23,12 @@ public interface CreateModuleScope<mUE : Any, RUNTIME_KEY : Any> {
|
||||
|
||||
public fun moduleScopedObject(namespace: Namespace<mUE> = this.rootNs, name: String): ModuleScopedObject<mUE, RUNTIME_KEY>
|
||||
|
||||
public fun <mUE : Any> substituteModule(rootNs: Namespace<mUE>, template: ModuleTemplate<mUE>): Module<mUE>
|
||||
public fun <mUE : Any> substituteModule(rootNs: Namespace<mUE>, template: ModuleTemplate<mUE>): Module<mUE, RUNTIME_KEY>
|
||||
|
||||
public fun namespace(parent: Namespace<mUE>, name: String): Namespace<mUE>
|
||||
|
||||
public fun addStatement(stmt: DialectResolver.Statement_Void2Void<*>)
|
||||
|
||||
@LowLevelApi
|
||||
public fun <sUE : Any> addStatement(stmt: DialectResolver.Statement_Params2Void<sUE>): InputRow._Scope<sUE, Unit>
|
||||
public fun <sUE : Any> _addStatement(stmt: DialectResolver.Statement_Params2Void<sUE>): InputRow._Scope<sUE, Unit>
|
||||
}
|
@ -1,28 +1,25 @@
|
||||
package ru.landgrafhomyak.db.sql_skeleton_0.api.module
|
||||
|
||||
import kotlin.jvm.JvmName
|
||||
import ru.landgrafhomyak.db.sql_skeleton_0.api.DebugApi
|
||||
import ru.landgrafhomyak.db.sql_skeleton_0.api.queries._Statement
|
||||
import ru.landgrafhomyak.db.sql_skeleton_0.api.runtime.Executor
|
||||
import ru.landgrafhomyak.db.sql_skeleton_0.api.table.Table
|
||||
import ru.landgrafhomyak.db.sql_skeleton_0.api.table.TableConstructor
|
||||
|
||||
|
||||
public interface Module<mUE : Any> {
|
||||
public interface Module<mUE : Any, RUNTIME_KEY: Any> {
|
||||
@Suppress("INAPPLICABLE_JVM_NAME")
|
||||
@get:JvmName("uExt")
|
||||
public val uExt: mUE
|
||||
|
||||
@DebugApi
|
||||
@Suppress("INAPPLICABLE_JVM_NAME")
|
||||
@get:JvmName("getVersionKey")
|
||||
public val versionKey: String
|
||||
|
||||
public fun <R : Any> createQuery(c: _Statement.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>
|
||||
|
||||
@DebugApi
|
||||
@Suppress("INAPPLICABLE_JVM_NAME")
|
||||
@get:JvmName("executor")
|
||||
public val executor: Executor
|
||||
@get:JvmName("getParent")
|
||||
public val parent: Module<*, RUNTIME_KEY>
|
||||
}
|
@ -1,8 +1,16 @@
|
||||
package ru.landgrafhomyak.db.sql_skeleton_0.api.module
|
||||
|
||||
import ru.landgrafhomyak.db.sql_skeleton_0.api.DebugApi
|
||||
import ru.landgrafhomyak.db.sql_skeleton_0.api.table.Table
|
||||
|
||||
public interface ModuleScopedObject<mUE : Any, RUNTIME_KEY : Any> {
|
||||
|
||||
@DebugApi
|
||||
public val name: String
|
||||
|
||||
@DebugApi
|
||||
public val module: Module<mUE, RUNTIME_KEY>
|
||||
public val namespace
|
||||
|
||||
@DebugApi
|
||||
public val namespace: Namespace<mUE>
|
||||
}
|
@ -1,13 +1,19 @@
|
||||
package ru.landgrafhomyak.db.sql_skeleton_0.api.module
|
||||
|
||||
import kotlin.jvm.JvmName
|
||||
import ru.landgrafhomyak.db.sql_skeleton_0.api.DebugApi
|
||||
|
||||
public interface Namespace<mUE: Any> {
|
||||
public interface Namespace<mUE : Any> {
|
||||
@DebugApi
|
||||
@Suppress("INAPPLICABLE_JVM_NAME")
|
||||
@get:JvmName("getName")
|
||||
public val name: String
|
||||
|
||||
@DebugApi
|
||||
@Suppress("INAPPLICABLE_JVM_NAME", "PropertyName")
|
||||
@get:JvmName("_getPath")
|
||||
public val _path: List<String>
|
||||
@get:JvmName("getPath")
|
||||
public val path: List<String>
|
||||
|
||||
@DebugApi
|
||||
public val module: Module
|
||||
}
|
@ -9,13 +9,10 @@ public interface UpgradeModuleScope<nmUE : Any, omUE : Any, RUNTIME_KEY : Any> :
|
||||
public fun <tUE : Any> keepTable(table: Table<tUE, omUE, RUNTIME_KEY>): Table<tUE, nmUE, RUNTIME_KEY>
|
||||
|
||||
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>): Table<tUE, nmUE, RUNTIME_KEY>
|
||||
|
||||
public fun <tUE : Any> keepAndRenameTable(table: Table<tUE, omUE, RUNTIME_KEY>, newNamespace: Namespace<nmUE>, newName: String): Table<tUE, nmUE, RUNTIME_KEY>
|
||||
|
||||
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> upgradeAndRenameTable(
|
||||
table: Table<otUE, omUE, RUNTIME_KEY>,
|
||||
newName: String,
|
||||
@ -37,7 +34,7 @@ public interface UpgradeModuleScope<nmUE : Any, omUE : Any, RUNTIME_KEY : Any> :
|
||||
|
||||
public fun deleteTable(table: Table<*, omUE, RUNTIME_KEY>)
|
||||
|
||||
public fun <tUE : Any> deleteTableAfterModuleUpgraded(table: Table<tUE, omUE, RUNTIME_KEY>): Table<tUE, nmUE, RUNTIME_KEY>
|
||||
public fun <tUE : Any> deleteTableAfterModuleUpgrade(table: Table<tUE, omUE, RUNTIME_KEY>): Table<tUE, nmUE, RUNTIME_KEY>
|
||||
|
||||
public fun exportTable(table: Table<*, omUE, RUNTIME_KEY>)
|
||||
|
||||
@ -52,12 +49,12 @@ public interface UpgradeModuleScope<nmUE : Any, omUE : Any, RUNTIME_KEY : Any> :
|
||||
upgrade: TableUpgrade<ntUE, otUE, RUNTIME_KEY>
|
||||
): Table<ntUE, nmUE, RUNTIME_KEY>
|
||||
|
||||
public fun <smUE : Any> keepModule(module: Module<smUE>): Module<smUE>
|
||||
public fun <smUE : Any> keepAndMoveModule(oldModule: Module<smUE>, newNs: Namespace<nmUE>): Module<smUE>
|
||||
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>): Module<smUE, RUNTIME_KEY>
|
||||
|
||||
public fun <smUE : Any> upgradeModule(oldModule: Module<*>, template: ModuleTemplate<smUE>): Module<smUE>
|
||||
public fun <smUE : Any> upgradeAndMoveModule(oldModule: Module<*>, newNs: Namespace<nmUE>, template: ModuleTemplate<smUE>): Module<smUE>
|
||||
public fun <smUE : Any> upgradeModule(oldModule: Module<*, RUNTIME_KEY>, template: ModuleTemplate<smUE>): Module<smUE, RUNTIME_KEY>
|
||||
public fun <smUE : Any> upgradeAndMoveModule(oldModule: Module<*, RUNTIME_KEY>, newNs: Namespace<nmUE>, template: ModuleTemplate<smUE>): Module<smUE, RUNTIME_KEY>
|
||||
|
||||
public fun removeModule(oldModule: Module<*>)
|
||||
public fun <smUE : Any> removeModuleAfterUpgrade(oldModule: Module<smUE>): Module<smUE>
|
||||
public fun removeModule(oldModule: Module<*, RUNTIME_KEY>)
|
||||
public fun <smUE : Any> removeModuleAfterUpgrade(oldModule: Module<smUE, RUNTIME_KEY>): Module<smUE, RUNTIME_KEY>
|
||||
}
|
@ -1,53 +1,51 @@
|
||||
package ru.landgrafhomyak.db.sql_skeleton_0.api.queries
|
||||
|
||||
import ru.landgrafhomyak.db.sql_skeleton_0.api.raw.DialectKey
|
||||
|
||||
public interface RawStatement<qUE : Any?, DIALECT : DialectKey<*, *, *, *, *, *, *, *, *>> : _Statement<qUE, DIALECT> {
|
||||
public interface RawStatement<qUE : Any?, RUNTIME_KEY: Any> : _Statement<qUE, RUNTIME_KEY> {
|
||||
public override val uExt: qUE
|
||||
|
||||
public interface Void2Void<qUE : Any?, DIALECT : DialectKey<*, *, *, *, *, *, *, *, *>> : RawStatement<qUE, DIALECT>, _Statement.Void2Void<qUE, DIALECT> {
|
||||
public interface Void2Void<qUE : Any?, RUNTIME_KEY: Any> : RawStatement<qUE, RUNTIME_KEY>, _Statement.Void2Void<qUE, RUNTIME_KEY> {
|
||||
override val uExt: qUE
|
||||
|
||||
public interface Constructor<qUE : Any?>
|
||||
}
|
||||
|
||||
public interface Void2Row<qUE : Any, DIALECT : DialectKey<*, *, *, *, *, *, *, *, *>> : RawStatement<qUE, DIALECT>, _Statement.Void2Row<qUE, DIALECT> {
|
||||
public interface Void2Row<qUE : Any, RUNTIME_KEY: Any> : RawStatement<qUE, RUNTIME_KEY>, _Statement.Void2Row<qUE, RUNTIME_KEY> {
|
||||
override val uExt: qUE
|
||||
|
||||
public interface Constructor<qUE : Any>
|
||||
}
|
||||
|
||||
public interface Void2RowOrNull<qUE : Any, DIALECT : DialectKey<*, *, *, *, *, *, *, *, *>> : RawStatement<qUE, DIALECT>, _Statement.Void2RowOrNull<qUE, DIALECT> {
|
||||
public interface Void2RowOrNull<qUE : Any, RUNTIME_KEY: Any> : RawStatement<qUE, RUNTIME_KEY>, _Statement.Void2RowOrNull<qUE, RUNTIME_KEY> {
|
||||
override val uExt: qUE
|
||||
|
||||
public interface Constructor<qUE : Any>
|
||||
}
|
||||
|
||||
public interface Void2Table<qUE : Any, DIALECT : DialectKey<*, *, *, *, *, *, *, *, *>> : RawStatement<qUE, DIALECT>, _Statement.Void2Table<qUE, DIALECT> {
|
||||
public interface Void2Table<qUE : Any, RUNTIME_KEY: Any> : RawStatement<qUE, RUNTIME_KEY>, _Statement.Void2Table<qUE, RUNTIME_KEY> {
|
||||
override val uExt: qUE
|
||||
|
||||
public interface Constructor<qUE : Any>
|
||||
}
|
||||
|
||||
public interface Params2Void<qUE : Any, DIALECT : DialectKey<*, *, *, *, *, *, *, *, *>> : RawStatement<qUE, DIALECT>, _Statement.Params2Void<qUE, DIALECT> {
|
||||
public interface Params2Void<qUE : Any, RUNTIME_KEY: Any> : RawStatement<qUE, RUNTIME_KEY>, _Statement.Params2Void<qUE, RUNTIME_KEY> {
|
||||
override val uExt: qUE
|
||||
|
||||
public interface Constructor<qUE : Any>
|
||||
}
|
||||
|
||||
public interface Params2Row<qUE : Any, DIALECT : DialectKey<*, *, *, *, *, *, *, *, *>> : RawStatement<qUE, DIALECT>, _Statement.Params2Row<qUE, DIALECT> {
|
||||
public interface Params2Row<qUE : Any, RUNTIME_KEY: Any> : RawStatement<qUE, RUNTIME_KEY>, _Statement.Params2Row<qUE, RUNTIME_KEY> {
|
||||
override val uExt: qUE
|
||||
|
||||
public interface Constructor<qUE : Any>
|
||||
}
|
||||
|
||||
public interface Params2RowOrNull<qUE : Any, DIALECT : DialectKey<*, *, *, *, *, *, *, *, *>> : RawStatement<qUE, DIALECT>, _Statement.Params2RowOrNull<qUE, DIALECT> {
|
||||
public interface Params2RowOrNull<qUE : Any, RUNTIME_KEY: Any> : RawStatement<qUE, RUNTIME_KEY>, _Statement.Params2RowOrNull<qUE, RUNTIME_KEY> {
|
||||
override val uExt: qUE
|
||||
|
||||
public interface Constructor<qUE : Any>
|
||||
}
|
||||
|
||||
public interface Params2Table<qUE : Any, DIALECT : DialectKey<*, *, *, *, *, *, *, *, *>> : RawStatement<qUE, DIALECT>, _Statement.Params2Table<qUE, DIALECT> {
|
||||
public interface Params2Table<qUE : Any, RUNTIME_KEY: Any> : RawStatement<qUE, RUNTIME_KEY>, _Statement.Params2Table<qUE, RUNTIME_KEY> {
|
||||
override val uExt: qUE
|
||||
|
||||
public interface Constructor<qUE : Any>
|
||||
|
@ -5,17 +5,17 @@ import ru.landgrafhomyak.db.sql_skeleton_0.api.raw.DialectKey
|
||||
|
||||
|
||||
@Suppress("ClassName")
|
||||
public interface _Statement<STATEMENT_USER_EXTENSION : Any?, DIALECT : DialectKey<*, *, *, *, *, *, *, *, *>> {
|
||||
public interface _Statement<STATEMENT_USER_EXTENSION : Any?, RUNTIME_KEY: Any> {
|
||||
@Suppress("INAPPLICABLE_JVM_NAME")
|
||||
@get:JvmName("uExt")
|
||||
public val uExt: STATEMENT_USER_EXTENSION
|
||||
|
||||
public interface Void2Void<qUE : Any?, DIALECT : DialectKey<*, *, *, *, *, *, *, *, *>> : _Statement<qUE, DIALECT>
|
||||
public interface Void2Row<qUE : Any, DIALECT : DialectKey<*, *, *, *, *, *, *, *, *>> : _Statement<qUE, DIALECT>
|
||||
public interface Void2RowOrNull<qUE : Any, DIALECT : DialectKey<*, *, *, *, *, *, *, *, *>> : _Statement<qUE, DIALECT>
|
||||
public interface Void2Table<qUE : Any, DIALECT : DialectKey<*, *, *, *, *, *, *, *, *>> : _Statement<qUE, DIALECT>
|
||||
public interface Params2Void<qUE : Any, DIALECT : DialectKey<*, *, *, *, *, *, *, *, *>> : _Statement<qUE, DIALECT>
|
||||
public interface Params2Row<qUE : Any, DIALECT : DialectKey<*, *, *, *, *, *, *, *, *>> : _Statement<qUE, DIALECT>
|
||||
public interface Params2RowOrNull<qUE : Any, DIALECT : DialectKey<*, *, *, *, *, *, *, *, *>> : _Statement<qUE, DIALECT>
|
||||
public interface Params2Table<qUE : Any, DIALECT : DialectKey<*, *, *, *, *, *, *, *, *>> : _Statement<qUE, DIALECT>
|
||||
public interface Void2Void<qUE : Any?, RUNTIME_KEY: Any> : _Statement<qUE, RUNTIME_KEY>
|
||||
public interface Void2Row<qUE : Any, RUNTIME_KEY: Any> : _Statement<qUE, RUNTIME_KEY>
|
||||
public interface Void2RowOrNull<qUE : Any, RUNTIME_KEY: Any> : _Statement<qUE, RUNTIME_KEY>
|
||||
public interface Void2Table<qUE : Any, RUNTIME_KEY: Any> : _Statement<qUE, RUNTIME_KEY>
|
||||
public interface Params2Void<qUE : Any, RUNTIME_KEY: Any> : _Statement<qUE, RUNTIME_KEY>
|
||||
public interface Params2Row<qUE : Any, RUNTIME_KEY: Any> : _Statement<qUE, RUNTIME_KEY>
|
||||
public interface Params2RowOrNull<qUE : Any, RUNTIME_KEY: Any> : _Statement<qUE, RUNTIME_KEY>
|
||||
public interface Params2Table<qUE : Any, RUNTIME_KEY: Any> : _Statement<qUE, RUNTIME_KEY>
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
package ru.landgrafhomyak.db.sql_skeleton_0.api.table
|
||||
|
||||
import kotlin.jvm.JvmName
|
||||
import ru.landgrafhomyak.db.sql_skeleton_0.api.DebugApi
|
||||
import ru.landgrafhomyak.db.sql_skeleton_0.api.module.Module
|
||||
|
||||
public interface Table<UE : Any, mUE : Any, RUNTIME_KEY : Any> {
|
||||
@ -8,10 +9,12 @@ public interface Table<UE : Any, mUE : Any, RUNTIME_KEY : Any> {
|
||||
@get:JvmName("uExt")
|
||||
public val uExt: UE
|
||||
|
||||
@DebugApi
|
||||
@Suppress("INAPPLICABLE_JVM_NAME")
|
||||
@get:JvmName("getName")
|
||||
public val name: String
|
||||
|
||||
@DebugApi
|
||||
@Suppress("INAPPLICABLE_JVM_NAME")
|
||||
@get:JvmName("getModule")
|
||||
public val module: Module<*>
|
||||
@ -23,6 +26,7 @@ public interface Table<UE : Any, mUE : Any, RUNTIME_KEY : Any> {
|
||||
MODULE_UPGRADE_SCOPE
|
||||
}
|
||||
|
||||
@DebugApi
|
||||
@Suppress("INAPPLICABLE_JVM_NAME")
|
||||
@get:JvmName("getLifeTime")
|
||||
public val lifeTime: LifeTime
|
||||
|
@ -1,5 +1,11 @@
|
||||
package ru.landgrafhomyak.db.sql_skeleton_0.api.table
|
||||
|
||||
import ru.landgrafhomyak.db.sql_skeleton_0.api.DebugApi
|
||||
|
||||
public interface TableScopedObject<tUE : Any, RUNTIME_KEY : Any> {
|
||||
public val table: Table<tUE, RUNTIME_KEY>
|
||||
@DebugApi
|
||||
public val name: String
|
||||
|
||||
@DebugApi
|
||||
public val table: Table<tUE, *, RUNTIME_KEY>
|
||||
}
|
@ -30,6 +30,6 @@ public interface TableUpgrade<tnUE : Any, toUE : Any, RUNTIME_KEY : Any> {
|
||||
public fun addAlterStatementAfterUpgrade(stmt: DialectResolver.Statement_Void2Void<*>)
|
||||
|
||||
@LowLevelApi
|
||||
public fun <sUE : Any> addAlterStatementAfterUpgrade(stmt: DialectResolver.Statement_Params2Void<sUE>): InputRow._Scope<sUE, Unit>
|
||||
public fun <sUE : Any> _addAlterStatementAfterUpgrade(stmt: DialectResolver.Statement_Params2Void<sUE>): InputRow._Scope<sUE, Unit>
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user