Skip to content

Commit

Permalink
Add support for SQLite 'regexp' methods
Browse files Browse the repository at this point in the history
Enable several ICU extensions that were previously
disabled. This CL just imports the changes from
https://android-review.googlesource.com/c/platform/external/sqlite/+/2572310.

Updates #8163

PiperOrigin-RevId: 528151614
  • Loading branch information
hoisie committed May 2, 2023
1 parent 245c8f6 commit 9551b04
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
Expand Up @@ -223,4 +223,18 @@ public void collate_unicode() {
c.close();
assertThat(sorted).containsExactly("aaa", "abc", "ABC", "bbb").inOrder();
}

@Test
@Config(minSdk = LOLLIPOP)
@SdkSuppress(minSdkVersion = LOLLIPOP)
public void regex_selection() {
ContentValues values = new ContentValues();
values.put("first_column", "test");
database.insert("table_name", null, values);
String select = "first_column regexp ?";
String[] selectArgs = {
"test",
};
assertThat(database.delete("table_name", select, selectArgs)).isEqualTo(1);
}
}
2 changes: 1 addition & 1 deletion nativeruntime/build.gradle
Expand Up @@ -66,7 +66,7 @@ dependencies {
api project(":utils:reflector")
api "com.google.guava:guava:$guavaJREVersion"

implementation "org.robolectric:nativeruntime-dist-compat:1.0.0"
implementation "org.robolectric:nativeruntime-dist-compat:1.0.1"

annotationProcessor "com.google.auto.service:auto-service:$autoServiceVersion"
compileOnly "com.google.auto.service:auto-service-annotations:$autoServiceVersion"
Expand Down

0 comments on commit 9551b04

Please sign in to comment.