Skip to content

Commit 984c849

Browse files
committed
like
1 parent f754c62 commit 984c849

File tree

7 files changed

+17
-8
lines changed

7 files changed

+17
-8
lines changed

.idea/modules.xml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ Make things easy when you need to write a sql statment for Android SQLite.
8585
.smallerEqual("THE_COLUMN", 40)
8686
.or()
8787
.equalTrim("TEST", " RAW ")
88+
.like("TEST2", "%fox%")
8889
.build();
8990
9091
> Output: SELECT * FROM TABLE WHERE THE_COLUMN > 9 AND THE_COLUMN <= 40 OR TRIM(TEST) = 'RAW'
@@ -144,5 +145,3 @@ Make things easy when you need to write a sql statment for Android SQLite.
144145
yourDb.update(tableName, cv, rowId + " = ?", new String[]{String.valueOf(yourId)});
145146

146147

147-
# License
148-
See the [LICENSE](/LICENSE.txt). file for license rights and limitations (MIT).

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apply plugin: 'com.android.application'
22

33
android {
44
compileSdkVersion 24
5-
buildToolsVersion "24.0.0"
5+
buildToolsVersion '25.0.0'
66

77
defaultConfig {
88
applicationId "com.vansuita.sqlitehelper"

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ buildscript {
33
jcenter()
44
}
55
dependencies {
6-
classpath 'com.android.tools.build:gradle:2.2.2'
6+
classpath 'com.android.tools.build:gradle:2.3.0'
77
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
88
}
99
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Mon Dec 28 10:00:20 PST 2015
1+
#Wed Apr 05 07:47:12 BRT 2017
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip

sqliteparser/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ group = 'com.github.jrvansuita'
55

66
android {
77
compileSdkVersion 24
8-
buildToolsVersion "24.0.0"
8+
buildToolsVersion '25.0.0'
99

1010
defaultConfig {
1111
minSdkVersion 9

sqliteparser/src/main/java/com/vansuita/sqliteparser/Query.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,14 @@ public Query in(String column, String subSelect) {
179179
return where(column + " IN (" + subSelect + ")");
180180
}
181181

182+
public Query like(String cAlias, String column, String value) {
183+
return like(colAlias(cAlias, column), value);
184+
}
185+
186+
public Query like(String column, String value) {
187+
return where(column, "LIKE", "'" + value + "'");
188+
}
189+
182190

183191
// --- Exists or Not --- //
184192

@@ -269,7 +277,6 @@ protected String getSql() {
269277
}
270278

271279

272-
273280
private String get(List<String> list) {
274281
return Utils.breakList(",", list);
275282
}

0 commit comments

Comments
 (0)