Commit d7ee4ef5 authored by topjohnwu's avatar topjohnwu

Fix SQL command syntax

parent 31f88e0f
......@@ -14,7 +14,7 @@ class SettingsDao : MagiskDB() {
}
suspend fun fetch(key: String, default: Int = -1): Int {
val query = "SELECT value FROM ${Table.SETTINGS} WHERE key == \"$key\" LIMIT = 1"
val query = "SELECT value FROM ${Table.SETTINGS} WHERE key == \"$key\" LIMIT 1"
return exec(query) { it["value"]?.toInt() }.firstOrNull() ?: default
}
}
......@@ -14,7 +14,7 @@ class StringDao : MagiskDB() {
}
suspend fun fetch(key: String, default: String = ""): String {
val query = "SELECT value FROM ${Table.STRINGS} WHERE key == \"$key\" LIMIT = 1"
val query = "SELECT value FROM ${Table.STRINGS} WHERE key == \"$key\" LIMIT 1"
return exec(query) { it["value"] }.firstOrNull() ?: default
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment