in amazon-chime-sdk/src/main/java/com/amazonaws/services/chime/sdk/meetings/internal/ingestion/database/SQLiteDatabaseManager.kt [99:124]
override fun insert(
tableName: String,
contentValues: List<ContentValues>
): Boolean {
logger.debug(TAG, "Inserting table $tableName with contentValues: ${contentValues.joinToString(",")}")
if (contentValues.isEmpty()) return true
// Handle multiple
writableDatabase.beginTransaction()
try {
for (contentValue in contentValues) {
writableDatabase.insertOrThrow(tableName, null, contentValue)
}
writableDatabase.setTransactionSuccessful()
} catch (exception: Exception) {
logger.error(
TAG,
"Unable to insert items into $tableName: ${exception.localizedMessage}"
)
return false
} finally {
writableDatabase.endTransaction()
}
return true
}