-
-
Notifications
You must be signed in to change notification settings - Fork 368
Open
Description
I have the following code:
public Operation getLocalOperation(int mostRecentOperation, int skip) {
try {
Operation operation = databaseHelper.getOperationDao().queryBuilder()
.orderBy(Operation.ID_FIELD, true)
.offset((long)skip)
.where()
.isNull(Operation.FOREIGN_USER_FIELD)
.and()
.ge(Operation.ID_FIELD, mostRecentOperation)
.queryForFirst();
return operation;
} catch (SQLException e) {
throw new RuntimeException("Cannot get local operation");
}
}Running this code on Android 30 yields the following exception:
SELECT * FROM Operations WHERE (ForeignUserIS NULL ANDId>= 0) ORDER BYId OFFSET 0 LIMIT 1
However, the query fails with the following exception and cause:
Problems executing Android query: SELECT * FROM `Operations` WHERE (`ForeignUser` IS NULL AND `Id` >= 0) ORDER BY `Id` OFFSET 0 LIMIT 1
near "OFFSET": syntax error (code 1 SQLITE_ERROR[1]): , while compiling: SELECT * FROM `Operations` WHERE (`ForeignUser` IS NULL AND `Id` >= 0) ORDER BY `Id` OFFSET 0 LIMIT 1
I'm using com.j256.ormlite:ormlite-android:6.1 on Android 30 (Samsung Galaxy S9+).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels