Elffuss BraidHub

kikocis/java-driver public

Adding functionality to the QueryBuilder such that the 'in()' method accepts a list of objects.
Changesetf00a5d7a86748ad59bcd8de56807dd94ab4c236cf83e1b8386eb335f9c7905fd
AuthorDarren Spehr <darren.spehr@mapquest.com> · 2014-11-04 16:11 -05:00
Committerolim7t <omichallat+github@gmail.com> · 2014-11-10 10:46 +01:00
Parentsb26c2602187a

Browse the files at this changeset

1 file changed

modified driver-core/src/main/java/com/datastax/driver/core/querybuilder/QueryBuilder.java +12 −0
@@ -286,6 +286,18 @@
286286 public static Clause in(String name, Object... values) {
287287 return new Clause.InClause(name, Arrays.asList(values));
288288 }
289+
290+ /**
291+ * Create an "in" where clause stating the provided column must be equal
292+ * to one of the provided values.
293+ *
294+ * @param name the column name
295+ * @param values the values
296+ * @return the corresponding where clause.
297+ */
298+ public static Clause in(String name, List<Object> values) {
299+ return new Clause.InClause(name, values);
300+ }
289301
290302 /**
291303 * Creates a "lesser than" where clause stating the provided column must be less than