diff --git a/src/commonMain/kotlin/ru/landgrafhomyak/db/sql_skeleton_0/api/queries/QueriesCompiler.kt b/src/commonMain/kotlin/ru/landgrafhomyak/db/sql_skeleton_0/api/queries/QueriesCompiler.kt new file mode 100644 index 0000000..35ada87 --- /dev/null +++ b/src/commonMain/kotlin/ru/landgrafhomyak/db/sql_skeleton_0/api/queries/QueriesCompiler.kt @@ -0,0 +1,12 @@ +package ru.landgrafhomyak.db.sql_skeleton_0.api.queries + +public interface QueriesCompiler { + public fun raw_void2void(constructor: RawStatement.Void2Void.ImplementationsProvider): RawStatement.Void2Void + public fun raw_void2row(constructor: RawStatement.Void2Row.ImplementationsProvider): RawStatement.Void2Row + public fun raw_void2rowOrNull(constructor: RawStatement.Void2RowOrNull.ImplementationsProvider): RawStatement.Void2RowOrNull + public fun raw_void2table(constructor: RawStatement.Void2Table.ImplementationsProvider): RawStatement.Void2Table + public fun raw_params2void(constructor: RawStatement.Params2Void.ImplementationsProvider): RawStatement.Params2Void + public fun raw_params2row(constructor: RawStatement.Params2Row.ImplementationsProvider): RawStatement.Params2Row + public fun raw_params2rowOrNull(constructor: RawStatement.Params2RowOrNull.ImplementationsProvider): RawStatement.Params2RowOrNull + public fun raw_params2table(constructor: RawStatement.Params2Table.ImplementationsProvider): RawStatement.Params2Table +} \ No newline at end of file diff --git a/src/commonMain/kotlin/ru/landgrafhomyak/db/sql_skeleton_0/api/runtime/InputRow.kt b/src/commonMain/kotlin/ru/landgrafhomyak/db/sql_skeleton_0/api/runtime/InputRow.kt index 43d94fa..2e3d82c 100644 --- a/src/commonMain/kotlin/ru/landgrafhomyak/db/sql_skeleton_0/api/runtime/InputRow.kt +++ b/src/commonMain/kotlin/ru/landgrafhomyak/db/sql_skeleton_0/api/runtime/InputRow.kt @@ -22,10 +22,6 @@ public interface InputRow { public operator fun set(c: QueryParam, value: Char): Unit = this.set(c, value) public operator fun set(c: QueryParam, value: Boolean): Unit = this.set(c, value) - public interface WithRedirect : InputRow { - public fun redirect(c: QueryParam, value: QueryParam) - } - @Suppress("ClassName") @LowLevelApi public interface _Scope : InputRow { @@ -38,12 +34,19 @@ public interface InputRow { public suspend fun _abort() } - @Suppress("ClassName") @LowLevelApi - public interface _Iterator : _Scope { + public interface _Iterator : _Scope, InputRow { @Suppress("FunctionName") @LowLevelApi - public fun _next(): Boolean + public suspend fun _next(): Boolean + + @Suppress("FunctionName") + @LowLevelApi + public override suspend fun _abort() + + @Suppress("FunctionName") + @LowLevelApi + public override suspend fun _finish(): Next } } \ No newline at end of file diff --git a/src/commonMain/kotlin/ru/landgrafhomyak/db/sql_skeleton_0/api/runtime/OutputRow.kt b/src/commonMain/kotlin/ru/landgrafhomyak/db/sql_skeleton_0/api/runtime/OutputRow.kt index e792bb0..e6cf541 100644 --- a/src/commonMain/kotlin/ru/landgrafhomyak/db/sql_skeleton_0/api/runtime/OutputRow.kt +++ b/src/commonMain/kotlin/ru/landgrafhomyak/db/sql_skeleton_0/api/runtime/OutputRow.kt @@ -24,17 +24,29 @@ public interface OutputRow { @Suppress("ClassName") @LowLevelApi - public interface _Iterator : OutputRow { + public interface _Scope : OutputRow { + @Suppress("FunctionName") + @LowLevelApi + public suspend fun _finish(): Next + + @Suppress("FunctionName") + @LowLevelApi + public suspend fun _abort() + } + + @Suppress("ClassName") + @LowLevelApi + public interface _Iterator : _Scope, OutputRow { @Suppress("FunctionName") @LowLevelApi public suspend fun _next(): Boolean @Suppress("FunctionName") @LowLevelApi - public suspend fun _abort() + public override suspend fun _abort() @Suppress("FunctionName") @LowLevelApi - public suspend fun _finish(): Next + public override suspend fun _finish(): Next } } \ No newline at end of file diff --git a/src/commonMain/kotlin/ru/landgrafhomyak/db/sql_skeleton_0/api/runtime/Transaction.kt b/src/commonMain/kotlin/ru/landgrafhomyak/db/sql_skeleton_0/api/runtime/Transaction.kt index 93fadeb..6561ed1 100644 --- a/src/commonMain/kotlin/ru/landgrafhomyak/db/sql_skeleton_0/api/runtime/Transaction.kt +++ b/src/commonMain/kotlin/ru/landgrafhomyak/db/sql_skeleton_0/api/runtime/Transaction.kt @@ -3,22 +3,40 @@ package ru.landgrafhomyak.db.sql_skeleton_0.api.runtime import ru.landgrafhomyak.db.sql_skeleton_0.api.LowLevelApi import ru.landgrafhomyak.db.sql_skeleton_0.api.queries._Statement -public interface Transaction { - @Suppress("FunctionName") - @LowLevelApi - public suspend fun _executeQuery(compiledQuery: _Statement.Void2Table): OutputRow._Iterator +public interface Transaction { + public suspend fun executeQuery_void2void(compiledQuery: _Statement.Void2Void) @Suppress("FunctionName") @LowLevelApi - public suspend fun _executeQuery(compiledQuery: _Statement.Params2Table): InputRow._Scope> + public suspend fun _executeQuery_void2row(compiledQuery: _Statement.Void2Row): OutputRow._Scope @Suppress("FunctionName") @LowLevelApi - public suspend fun _executeQuery(compiledQuery: _Statement.Table2Void): InputRow._Iterator + public suspend fun _executeQuery_void2rowOrNull(compiledQuery: _Statement.Void2RowOrNull): OutputRow._Scope? @Suppress("FunctionName") @LowLevelApi - public suspend fun _executeQuery(compiledQuery: _Statement.Params2Void): InputRow._Scope + public suspend fun _executeQuery_void2table(compiledQuery: _Statement.Void2RowOrNull): OutputRow._Iterator + + @Suppress("FunctionName") + @LowLevelApi + public suspend fun _executeQuery_params2void(compiledQuery: _Statement.Void2Void): InputRow._Scope + + @Suppress("FunctionName") + @LowLevelApi + public suspend fun _executeQuery_params2row(compiledQuery: _Statement.Void2Row): InputRow._Scope> + + @Suppress("FunctionName") + @LowLevelApi + public suspend fun _executeQuery_params2rowOrNull(compiledQuery: _Statement.Void2RowOrNull):InputRow._Scope?> + + @Suppress("FunctionName") + @LowLevelApi + public suspend fun _executeQuery_params2table(compiledQuery: _Statement.Void2RowOrNull): InputRow._Scope> + + @Suppress("FunctionName") + @LowLevelApi + public suspend fun _executeBatch_params2void(compiledQuery: _Statement.Void2Void): InputRow._Iterator public suspend fun rollback()