Renamed 'ObjectOperations' to 'ObjectClass' and simplified its provider
This commit is contained in:
parent
b0448030ae
commit
12c5e30b6f
@ -12,7 +12,7 @@ public interface Driver<
|
||||
@Suppress("unused") STATEMENT_CONSTRUCTOR__PARAMS_2_ROW : RawStatement.Params2Row.Constructor<*>,
|
||||
@Suppress("unused") STATEMENT_CONSTRUCTOR__PARAMS_2_ROW_OR_NULL : RawStatement.Params2RowOrNull.Constructor<*>,
|
||||
@Suppress("unused") STATEMENT_CONSTRUCTOR__PARAMS_2_TABLE : RawStatement.Params2Table.Constructor<*>,
|
||||
@Suppress("unused") OBJECT_OPERATIONS : ObjectOperations<*>
|
||||
@Suppress("unused") OBJECT_OPERATIONS : ObjectClass<*>
|
||||
> {
|
||||
@ReflectionApi
|
||||
public fun isImplements(version: ApiVersion): Boolean
|
||||
@ -26,5 +26,5 @@ public interface Driver<
|
||||
public fun assertImplemented_rawStatement_params2row(ip: RawStatement.Params2Row.ImplementationsProvider<*>)
|
||||
public fun assertImplemented_rawStatement_params2rowOrNull(ip: RawStatement.Params2RowOrNull.ImplementationsProvider<*>)
|
||||
public fun assertImplemented_rawStatement_params2table(ip: RawStatement.Params2Table.ImplementationsProvider<*>)
|
||||
public fun assertImplemented_objectOperations(ip: ObjectOperations.ImplementationsProvider)
|
||||
public fun assertImplemented_objectOperations(ip: ObjectClass.ImplementationsProvider)
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package ru.landgrafhomyak.db.skeleton1.api
|
||||
|
||||
public interface ObjectClass<@Suppress("unused") UE : Any?> {
|
||||
public fun interface ImplementationsProvider {
|
||||
public fun provideStatementImplementations_databaseType(scope: Scope)
|
||||
|
||||
public interface Scope {
|
||||
public fun <CLASS : ObjectClass<*>> addImplementation(
|
||||
key: Driver<*, *, *, *, *, *, *, *, *, CLASS>, type: CLASS
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
package ru.landgrafhomyak.db.skeleton1.api
|
||||
|
||||
public interface ObjectOperations<@Suppress("unused") UE : Any?> {
|
||||
public fun interface ImplementationsProvider {
|
||||
public fun provideStatementImplementations_databaseType(scope: Scope)
|
||||
|
||||
public interface Scope {
|
||||
@Suppress("ERROR_SUPPRESSION", "BOUNDS_NOT_ALLOWED_IF_BOUNDED_BY_TYPE_PARAMETER", "INCONSISTENT_TYPE_PARAMETER_BOUNDS")
|
||||
public fun <UE, OPERATIONS, OPERATIONS_UNBOUND> addImplementation(
|
||||
key: Driver<*, *, *, *, *, *, *, *, *, OPERATIONS_UNBOUND>, type: OPERATIONS
|
||||
) where OPERATIONS_UNBOUND : ObjectOperations<*>,
|
||||
OPERATIONS : ObjectOperations<UE>,
|
||||
OPERATIONS : OPERATIONS_UNBOUND
|
||||
}
|
||||
}
|
||||
}
|
@ -2,7 +2,7 @@ package ru.landgrafhomyak.db.skeleton1.api.module
|
||||
|
||||
import kotlin.jvm.JvmName
|
||||
import ru.landgrafhomyak.db.skeleton1.api.LowLevelApi
|
||||
import ru.landgrafhomyak.db.skeleton1.api.ObjectOperations
|
||||
import ru.landgrafhomyak.db.skeleton1.api.ObjectClass
|
||||
import ru.landgrafhomyak.db.skeleton1.api.statement.RawStatement
|
||||
import ru.landgrafhomyak.db.skeleton1.api.statement._Statement
|
||||
import ru.landgrafhomyak.db.skeleton1.api.table.Table
|
||||
@ -22,7 +22,7 @@ public interface ModuleConstructorScope<mUE : Any> {
|
||||
|
||||
public fun moduleScopedObject(
|
||||
namespace: Namespace<mUE> = this.rootNs,
|
||||
name: String, metadata: ObjectOperations.ImplementationsProvider
|
||||
name: String, metadata: ObjectClass.ImplementationsProvider
|
||||
): ModuleScopedObject<mUE>
|
||||
|
||||
public fun <smUE : Any> substituteModule(rootNs: Namespace<mUE>, template: Module.Template<smUE>): Module<smUE>
|
||||
|
@ -2,7 +2,7 @@ package ru.landgrafhomyak.db.skeleton1.api.module
|
||||
|
||||
import kotlin.jvm.JvmName
|
||||
import ru.landgrafhomyak.db.skeleton1.api.ReflectionApi
|
||||
import ru.landgrafhomyak.db.skeleton1.api.ObjectOperations
|
||||
import ru.landgrafhomyak.db.skeleton1.api.ObjectClass
|
||||
|
||||
public interface ModuleScopedObject<mUE : Any> {
|
||||
@ReflectionApi
|
||||
@ -17,5 +17,5 @@ public interface ModuleScopedObject<mUE : Any> {
|
||||
public val pathFromModuleRoot: List<String>
|
||||
|
||||
@ReflectionApi
|
||||
public val meta: ObjectOperations.ImplementationsProvider
|
||||
public val objectClassProvider: ObjectClass.ImplementationsProvider
|
||||
}
|
@ -2,7 +2,7 @@ package ru.landgrafhomyak.db.skeleton1.api.table
|
||||
|
||||
import ru.landgrafhomyak.db.skeleton1.api.LowLevelApi
|
||||
import ru.landgrafhomyak.db.skeleton1.api.DatabaseType
|
||||
import ru.landgrafhomyak.db.skeleton1.api.ObjectOperations
|
||||
import ru.landgrafhomyak.db.skeleton1.api.ObjectClass
|
||||
import ru.landgrafhomyak.db.skeleton1.api.statement.RawStatement
|
||||
import ru.landgrafhomyak.db.skeleton1.api.statement._Statement
|
||||
import ru.landgrafhomyak.db.skeleton1.api.runtime.InputRow
|
||||
@ -32,7 +32,7 @@ public interface TableConstructorScope<tUE : Any> {
|
||||
alterCreateColumn: RawStatement.Params2Void.ImplementationsProvider<sUE>
|
||||
): InputRow._Scope<sUE, Column<RT, tUE>>
|
||||
|
||||
public fun tableScopedObject(name: String, metadata: ObjectOperations.ImplementationsProvider): TableScopedObject<tUE>
|
||||
public fun tableScopedObject(name: String, metadata: ObjectClass.ImplementationsProvider): TableScopedObject<tUE>
|
||||
|
||||
public fun addAlterStatement(stmt: _Statement.Void2Void<*>)
|
||||
public fun addAlterStatement(stmt: RawStatement.Void2Void.ImplementationsProvider<*>)
|
||||
|
@ -2,7 +2,7 @@ package ru.landgrafhomyak.db.skeleton1.api.table
|
||||
|
||||
import kotlin.jvm.JvmName
|
||||
import ru.landgrafhomyak.db.skeleton1.api.ReflectionApi
|
||||
import ru.landgrafhomyak.db.skeleton1.api.ObjectOperations
|
||||
import ru.landgrafhomyak.db.skeleton1.api.ObjectClass
|
||||
|
||||
public interface TableScopedObject<tUE : Any> {
|
||||
@ReflectionApi
|
||||
@ -12,7 +12,8 @@ public interface TableScopedObject<tUE : Any> {
|
||||
public val table: Table<tUE, *>
|
||||
|
||||
@ReflectionApi
|
||||
public val meta: ObjectOperations.ImplementationsProvider
|
||||
public val objectClassProvider: ObjectClass.ImplementationsProvider
|
||||
|
||||
|
||||
@ReflectionApi
|
||||
@Suppress("INAPPLICABLE_JVM_NAME")
|
||||
|
Loading…
Reference in New Issue
Block a user