From 7ca7f9878e011eb10ca339c07ad2f796d366f76b Mon Sep 17 00:00:00 2001 From: Andrew Golovashevich Date: Fri, 7 Feb 2025 17:20:29 +0300 Subject: [PATCH] Normal tables now can be immutable --- .../landgrafhomyak/db/serdha0/api/module/CreateModuleScope.kt | 2 +- .../kotlin/ru/landgrafhomyak/db/serdha0/api/table/Table.kt | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/commonMain/kotlin/ru/landgrafhomyak/db/serdha0/api/module/CreateModuleScope.kt b/src/commonMain/kotlin/ru/landgrafhomyak/db/serdha0/api/module/CreateModuleScope.kt index 107cf99..6240312 100644 --- a/src/commonMain/kotlin/ru/landgrafhomyak/db/serdha0/api/module/CreateModuleScope.kt +++ b/src/commonMain/kotlin/ru/landgrafhomyak/db/serdha0/api/module/CreateModuleScope.kt @@ -27,7 +27,7 @@ public interface CreateModuleScope { * @param initializer Table-related descriptors initializer. * @return Table descriptor. */ - public fun createTable(namespace: Namespace = this.rootNs, name: String, initializer: TableConstructor): Table + public fun createTable(namespace: Namespace = this.rootNs, name: String, initializer: TableConstructor, mutable: Boolean = true): Table /** * Creates a temporary table that exits only until connection to the database not [closed][SynchronizedDatabase._close]. diff --git a/src/commonMain/kotlin/ru/landgrafhomyak/db/serdha0/api/table/Table.kt b/src/commonMain/kotlin/ru/landgrafhomyak/db/serdha0/api/table/Table.kt index 36ec1fb..504485d 100644 --- a/src/commonMain/kotlin/ru/landgrafhomyak/db/serdha0/api/table/Table.kt +++ b/src/commonMain/kotlin/ru/landgrafhomyak/db/serdha0/api/table/Table.kt @@ -15,6 +15,7 @@ public interface Table : _Sele public val temporaryType: TemporaryType? - // todo make nullable for temp tables public val namespacesFromModuleRoot: List + + public val isMutable: Boolean } \ No newline at end of file