Skip to content

Commit 2d4cc16

Browse files
committed
change string array for object array
1 parent 18e9e87 commit 2d4cc16

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

simplesql/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ android {
77
defaultConfig {
88
minSdkVersion 11
99
targetSdkVersion 29
10-
versionCode 29
11-
versionName "1.0.28"
10+
versionCode 30
11+
versionName "1.0.29"
1212

1313
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1414
consumerProguardFiles 'consumer-rules.pro'

simplesql/src/main/java/com/simplesql/simplesql/config/SimpleSQL.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ public class Update {
351351
private String tableName, field, writeSQL, column, table, stringSet;
352352
private String SQLString;
353353
private Object value;
354-
private String[] values, fields;
354+
private Object[] values, fields;
355355

356356
/**
357357
* @param typeObject
@@ -379,7 +379,7 @@ public Update set(String[] fields) {
379379
return this;
380380
}
381381

382-
public Update values(String[] values) {
382+
public Update values(Object[] values) {
383383
this.values = values;
384384
return this;
385385
}
@@ -460,10 +460,10 @@ public Update writeSQL(String operator) {
460460
public boolean execute() {
461461
SQLiteDatabase write = helperBD.getReadableDatabase();
462462
int i = 0;
463-
for (String s : fields) {
463+
for (Object s : fields) {
464464
String replace = "%" + i;
465465

466-
SQLString = SQLString.replace(replace, (CharSequence) getString(values[i]));
466+
SQLString = SQLString.replace(replace, (CharSequence) getString((String) values[i]));
467467
i++;
468468
}
469469
SQLString = SQLString + ";";

0 commit comments

Comments
 (0)