Fix infinite export loop and improve general error handling.

This commit is contained in:
Cody Henthorne
2022-10-18 16:06:37 -04:00
committed by GitHub
parent 0d715d2c18
commit 7fccbd44c0
18 changed files with 155 additions and 30 deletions

View File

@@ -229,6 +229,7 @@ class UpdateBuilderPart3(
private val where: String,
private val whereArgs: Array<String>
) {
@JvmOverloads
fun run(conflictStrategy: Int = SQLiteDatabase.CONFLICT_NONE): Int {
return db.update(tableName, conflictStrategy, values, where, whereArgs)
}

View File

@@ -10,6 +10,8 @@ interface Serializer<T, R> {
interface StringSerializer<T> : Serializer<T, String>
interface IntSerializer<T> : Serializer<T, Int>
interface LongSerializer<T> : Serializer<T, Long>
interface ByteSerializer<T> : Serializer<T, ByteArray>

View File

@@ -63,7 +63,7 @@ object SqlUtil {
return objects.map {
when (it) {
null -> throw NullPointerException("Cannot have null arg!")
is DatabaseId -> (it as DatabaseId?)!!.serialize()
is DatabaseId -> it.serialize()
else -> it.toString()
}
}.toTypedArray()