[history/cw-adjutant] Table now can be converted to SQL string

This commit is contained in:
Andrew Golovashevich 2024-08-23 13:30:00 +03:00
parent b757b4c589
commit fc29095e2b

View File

@ -91,12 +91,12 @@ public class SqliteNamespace(
return SqliteTableName(this.formatTableName(name)) return SqliteTableName(this.formatTableName(name))
} }
private fun formatTableName(name: String) = this.path.joinToString(prefix = "::", separator = "::", postfix = "::${name}")
private fun formatTableName(name: String) = this.path.joinToString(prefix = "\"::", separator = "::", postfix = "::${name}\"")
} }
@JvmInline public class SqliteTableName(private val name: String) {
public value class SqliteTableName(private val value: String) { public val asSqlReference: String = "\"${this.name}\""
override fun toString(): String = this.value public val asSqlString: String = "\'${this.name}\'"
override fun toString(): String = this.asSqlReference
} }