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:
parent
cbb04e8f0c
commit
f673c4eb83
1 changed files with 7 additions and 8 deletions
|
@ -6,7 +6,6 @@ import android.database.sqlite.SQLiteDatabase
|
|||
import androidx.core.content.contentValuesOf
|
||||
import androidx.sqlite.db.SupportSQLiteDatabase
|
||||
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
|
||||
|
@ -168,7 +167,7 @@ class SelectBuilderPart2(
|
|||
private val columns: Array<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))
|
||||
}
|
||||
|
||||
|
@ -316,12 +315,12 @@ class UpdateBuilderPart2(
|
|||
private val tableName: String,
|
||||
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())
|
||||
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())
|
||||
return UpdateBuilderPart3(db, tableName, values, where, whereArgs)
|
||||
}
|
||||
|
@ -368,12 +367,12 @@ class DeleteBuilderPart1(
|
|||
private val db: SupportSQLiteDatabase,
|
||||
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())
|
||||
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())
|
||||
return DeleteBuilderPart2(db, tableName, where, whereArgs)
|
||||
}
|
||||
|
@ -395,11 +394,11 @@ class ExistsBuilderPart1(
|
|||
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))
|
||||
}
|
||||
|
||||
fun where(@Language("sql") where: String, whereArgs: Array<String>): ExistsBuilderPart2 {
|
||||
fun where(where: String, whereArgs: Array<String>): ExistsBuilderPart2 {
|
||||
return ExistsBuilderPart2(db, tableName, where, whereArgs)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue