Skip to content

Commit

Permalink
handle boolean values in parseComparable
Browse files Browse the repository at this point in the history
  • Loading branch information
reugn committed Jun 13, 2021
1 parent 06ec170 commit 9170240
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/main/java/com/aerospike/jdbc/query/ExpressionBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -110,18 +110,18 @@ private static Pair<Exp, Exp> parseComparable(WhereExpression whereExpression) {
);
} catch (NumberFormatException ignore) {
}
// if (value.equalsIgnoreCase("true") ||
// value.equalsIgnoreCase("false")) {
// return new Pair<>(
// Exp.boolBin(whereExpression.getColumn()), // TODO will be available with the next client version
// Exp.val(Boolean.parseBoolean(value))
// );
// } else {
if (value.equalsIgnoreCase("true") ||
value.equalsIgnoreCase("false")) {
return new Pair<>(
Exp.boolBin(whereExpression.getColumn()),
Exp.val(Boolean.parseBoolean(value))
);
} else {
return new Pair<>(
Exp.stringBin(whereExpression.getColumn()),
Exp.val(value)
);
// }
}
}
}

Expand Down

0 comments on commit 9170240

Please sign in to comment.