Skip to content

Commit

Permalink
like
Browse files Browse the repository at this point in the history
  • Loading branch information
jrvansuita committed Apr 5, 2017
1 parent f754c62 commit 984c849
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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


# License
See the [LICENSE](/LICENSE.txt). file for license rights and limitations (MIT).
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apply plugin: 'com.android.application'

android {
compileSdkVersion 24
buildToolsVersion "24.0.0"
buildToolsVersion '25.0.0'

defaultConfig {
applicationId "com.vansuita.sqlitehelper"
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.2'
classpath 'com.android.tools.build:gradle:2.3.0'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
}
}
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Mon Dec 28 10:00:20 PST 2015
#Wed Apr 05 07:47:12 BRT 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
2 changes: 1 addition & 1 deletion sqliteparser/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ group = 'com.github.jrvansuita'

android {
compileSdkVersion 24
buildToolsVersion "24.0.0"
buildToolsVersion '25.0.0'

defaultConfig {
minSdkVersion 9
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,14 @@ public Query in(String column, String subSelect) {
return where(column + " IN (" + subSelect + ")");
}

public Query like(String cAlias, String column, String value) {
return like(colAlias(cAlias, column), value);
}

public Query like(String column, String value) {
return where(column, "LIKE", "'" + value + "'");
}


// --- Exists or Not --- //

Expand Down Expand Up @@ -269,7 +277,6 @@ protected String getSql() {
}



private String get(List<String> list) {
return Utils.breakList(",", list);
}
Expand Down

0 comments on commit 984c849

Please sign in to comment.