Skip to content

Commit

Permalink
Improve compatibility by adding type to float properties in GremlinGr…
Browse files Browse the repository at this point in the history
…oovy (#220)

- `.property('float_prop',1.4)` → `.property('float_prop', 1.4d)`
- JanusGraph/janusgraph#487

Signed-off-by: Dwitry dwitry@users.noreply.github.com
  • Loading branch information
dwitry committed Nov 16, 2018
1 parent 7807fbf commit 209a37f
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ public static String toLiteral(Object argument) {
if (argument instanceof String) {
return toStringLiteral((String) argument);
}
if (argument instanceof Double || argument instanceof Float) {
return argument.toString() + "d";
}
if (argument == null) {
return "null";
}
Expand Down

0 comments on commit 209a37f

Please sign in to comment.