Skip to content

Commit

Permalink
Can't create arbitrary-size BINARY column in SQLite #1443
Browse files Browse the repository at this point in the history
  • Loading branch information
Tapac committed Apr 16, 2022
1 parent 9a4bb9f commit 3991406
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,7 @@ internal object SQLiteDataTypeProvider : DataTypeProvider() {
override fun integerAutoincType(): String = "INTEGER PRIMARY KEY AUTOINCREMENT"
override fun longAutoincType(): String = "INTEGER PRIMARY KEY AUTOINCREMENT"
override fun floatType(): String = "SINGLE"
override fun binaryType(): String {
exposedLogger.error("The length of the Binary column is missing.")
error("The length of the Binary column is missing.")
}

override fun binaryType(): String = "BLOB"
override fun dateTimeType(): String = "TEXT"
override fun booleanToStatementString(bool: Boolean) = if (bool) "1" else "0"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ class DDLTests : DatabaseTestsBase() {

fun SizedIterable<ResultRow>.readAsString() = map { String(it[tableWithBinary.binaryColumn]) }

withDb(listOf(TestDB.POSTGRESQL, TestDB.POSTGRESQLNG)) {
withDb(listOf(TestDB.POSTGRESQL, TestDB.POSTGRESQLNG, TestDB.SQLITE)) {
val exposedBytes = "Exposed".toByteArray()
val kotlinBytes = "Kotlin".toByteArray()

Expand Down

0 comments on commit 3991406

Please sign in to comment.