diff options
author | Sotaro SUZUKI <sotaro.suzuki@architector.jp> | 2014-10-01 15:32:06 +0900 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2014-10-06 10:08:50 -0400 |
commit | dd21bce82da9617ff8f748f8567b0329aca07b83 (patch) | |
tree | 730a2b85b54537a016219b9a08f4d16fb82897e1 /src/main/java/com/iciql/Query.java | |
parent | 06c1374cfc17bdad621f6ad5154f4de08905da99 (diff) | |
download | iciql-dd21bce82da9617ff8f748f8567b0329aca07b83.tar.gz iciql-dd21bce82da9617ff8f748f8567b0329aca07b83.zip |
add support condition oneOf / noneOf
var-length parameterized IN(?, ?, ...), NOT IN(?, ?, ...) support
Diffstat (limited to 'src/main/java/com/iciql/Query.java')
-rw-r--r-- | src/main/java/com/iciql/Query.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/main/java/com/iciql/Query.java b/src/main/java/com/iciql/Query.java index 45de08b..5f29edf 100644 --- a/src/main/java/com/iciql/Query.java +++ b/src/main/java/com/iciql/Query.java @@ -792,6 +792,22 @@ public class Query<T> { addParameter(stat, alias, valueRight);
}
+ public void appendSQL(SQLStatement stat, Object alias, Iterable<Object> values,
+ CompareType compareType) {
+ boolean first = true;
+ stat.appendSQL("(");
+ for (Object value : values) {
+ if (first) {
+ first = false;
+ } else {
+ stat.appendSQL(", ");
+ }
+ stat.appendSQL("?");
+ addParameter(stat, alias, value);
+ }
+ stat.appendSQL(")");
+ }
+
private void addParameter(SQLStatement stat, Object alias, Object value) {
if (alias != null && value.getClass().isEnum()) {
SelectColumn<T> col = getColumnByReference(alias);
|