mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-23 04:28:35 +00:00
Remove sql language annotation (for now).
It's broken in newer versions of Android Studio. It doesn't seem to allow partial-sql anymore, only fully-formed statements. Same with roomsql.
This commit is contained in:
@@ -6,7 +6,6 @@ import android.database.sqlite.SQLiteDatabase
|
|||||||
import androidx.core.content.contentValuesOf
|
import androidx.core.content.contentValuesOf
|
||||||
import androidx.sqlite.db.SupportSQLiteDatabase
|
import androidx.sqlite.db.SupportSQLiteDatabase
|
||||||
import androidx.sqlite.db.SupportSQLiteQueryBuilder
|
import androidx.sqlite.db.SupportSQLiteQueryBuilder
|
||||||
import org.intellij.lang.annotations.Language
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Begins a transaction on the `this` database, runs the provided [block] providing the `this` value as it's argument
|
* Begins a transaction on the `this` database, runs the provided [block] providing the `this` value as it's argument
|
||||||
@@ -168,7 +167,7 @@ class SelectBuilderPart2(
|
|||||||
private val columns: Array<String>,
|
private val columns: Array<String>,
|
||||||
private val tableName: String
|
private val tableName: String
|
||||||
) {
|
) {
|
||||||
fun where(@Language("sql") where: String, vararg whereArgs: Any): SelectBuilderPart3 {
|
fun where(where: String, vararg whereArgs: Any): SelectBuilderPart3 {
|
||||||
return SelectBuilderPart3(db, columns, tableName, where, SqlUtil.buildArgs(*whereArgs))
|
return SelectBuilderPart3(db, columns, tableName, where, SqlUtil.buildArgs(*whereArgs))
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -316,12 +315,12 @@ class UpdateBuilderPart2(
|
|||||||
private val tableName: String,
|
private val tableName: String,
|
||||||
private val values: ContentValues
|
private val values: ContentValues
|
||||||
) {
|
) {
|
||||||
fun where(@Language("sql") where: String, vararg whereArgs: Any): UpdateBuilderPart3 {
|
fun where(where: String, vararg whereArgs: Any): UpdateBuilderPart3 {
|
||||||
require(where.isNotBlank())
|
require(where.isNotBlank())
|
||||||
return UpdateBuilderPart3(db, tableName, values, where, SqlUtil.buildArgs(*whereArgs))
|
return UpdateBuilderPart3(db, tableName, values, where, SqlUtil.buildArgs(*whereArgs))
|
||||||
}
|
}
|
||||||
|
|
||||||
fun where(@Language("sql") where: String, whereArgs: Array<String>): UpdateBuilderPart3 {
|
fun where(where: String, whereArgs: Array<String>): UpdateBuilderPart3 {
|
||||||
require(where.isNotBlank())
|
require(where.isNotBlank())
|
||||||
return UpdateBuilderPart3(db, tableName, values, where, whereArgs)
|
return UpdateBuilderPart3(db, tableName, values, where, whereArgs)
|
||||||
}
|
}
|
||||||
@@ -368,12 +367,12 @@ class DeleteBuilderPart1(
|
|||||||
private val db: SupportSQLiteDatabase,
|
private val db: SupportSQLiteDatabase,
|
||||||
private val tableName: String
|
private val tableName: String
|
||||||
) {
|
) {
|
||||||
fun where(@Language("sql") where: String, vararg whereArgs: Any): DeleteBuilderPart2 {
|
fun where(where: String, vararg whereArgs: Any): DeleteBuilderPart2 {
|
||||||
require(where.isNotBlank())
|
require(where.isNotBlank())
|
||||||
return DeleteBuilderPart2(db, tableName, where, SqlUtil.buildArgs(*whereArgs))
|
return DeleteBuilderPart2(db, tableName, where, SqlUtil.buildArgs(*whereArgs))
|
||||||
}
|
}
|
||||||
|
|
||||||
fun where(@Language("sql") where: String, whereArgs: Array<String>): DeleteBuilderPart2 {
|
fun where(where: String, whereArgs: Array<String>): DeleteBuilderPart2 {
|
||||||
require(where.isNotBlank())
|
require(where.isNotBlank())
|
||||||
return DeleteBuilderPart2(db, tableName, where, whereArgs)
|
return DeleteBuilderPart2(db, tableName, where, whereArgs)
|
||||||
}
|
}
|
||||||
@@ -395,11 +394,11 @@ class ExistsBuilderPart1(
|
|||||||
private val tableName: String
|
private val tableName: String
|
||||||
) {
|
) {
|
||||||
|
|
||||||
fun where(@Language("sql") where: String, vararg whereArgs: Any): ExistsBuilderPart2 {
|
fun where(where: String, vararg whereArgs: Any): ExistsBuilderPart2 {
|
||||||
return ExistsBuilderPart2(db, tableName, where, SqlUtil.buildArgs(*whereArgs))
|
return ExistsBuilderPart2(db, tableName, where, SqlUtil.buildArgs(*whereArgs))
|
||||||
}
|
}
|
||||||
|
|
||||||
fun where(@Language("sql") where: String, whereArgs: Array<String>): ExistsBuilderPart2 {
|
fun where(where: String, whereArgs: Array<String>): ExistsBuilderPart2 {
|
||||||
return ExistsBuilderPart2(db, tableName, where, whereArgs)
|
return ExistsBuilderPart2(db, tableName, where, whereArgs)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user