mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-21 03:28:47 +00:00
Periodically optimize the FTS index.
This commit is contained in:
@@ -36,6 +36,15 @@ object SqlUtil {
|
||||
return tables
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the total number of changes that have been made since the creation of this database connection.
|
||||
*
|
||||
* IMPORTANT: Due to how connection pooling is handled in the app, the only way to have this return useful numbers is to call it within a transaction.
|
||||
*/
|
||||
fun getTotalChanges(db: SupportSQLiteDatabase): Long {
|
||||
return db.query("SELECT total_changes()", null).readToSingleLong()
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getAllTriggers(db: SupportSQLiteDatabase): List<String> {
|
||||
val tables: MutableList<String> = LinkedList()
|
||||
|
||||
Reference in New Issue
Block a user