Skip to content

Commit 7bcab56

Browse files
authored
Merge pull request #2 from AkramLZ/master
String parsing fix in PreparedQuery's paremeters
2 parents af20d1a + 0c023c4 commit 7bcab56

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ plugins {
66
}
77

88
group 'me.Cobeine'
9-
version '1.5.2-SNAPSHOT'
9+
version '1.5.3-SNAPSHOT'
1010

1111
repositories {
1212
mavenCentral()

src/main/java/me/cobeine/sqlava/connection/database/query/PreparedQuery.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ public PreparedQuery setParameter(int index, Object value) {
3232
if (statement == null)
3333
return this;
3434

35-
statement.setObject(index, value);
35+
if (value instanceof String) statement.setString(index, (String) value);
36+
else statement.setObject(index, value);
3637
} catch (Exception ignored) {
3738
}
3839
return this;

0 commit comments

Comments
 (0)