Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/main/java/com/redislabs/redisgraph/impl/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ private static String valueToString(Object value) {
if(String.class.isInstance(value)){
return quoteString((String) value);
}
if(Character.class.isInstance((value))){
return quoteString(((Character)value).toString());
}

if(value.getClass().isArray()){
return arrayToString((Object[]) value);
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/com/redislabs/redisgraph/RedisGraphAPITest.java
Original file line number Diff line number Diff line change
Expand Up @@ -879,8 +879,8 @@ public void testPath(){

@Test
public void testParameters(){
Object[] parameters = {1, 2.3, true, false, null, "str", Arrays.asList(1,2,3), new Integer[]{1,2,3}};
Object[] expected_anwsers = {1L, 2.3, true, false, null, "str", Arrays.asList(1L, 2L, 3L), new Long[]{1L, 2L, 3L}};
Object[] parameters = {1, 2.3, true, false, null, "str", 'a', "b" ,Arrays.asList(1,2,3), new Integer[]{1,2,3}};
Object[] expected_anwsers = {1L, 2.3, true, false, null, "str", "a", "b", Arrays.asList(1L, 2L, 3L), new Long[]{1L, 2L, 3L}};
Comment thread
gkorland marked this conversation as resolved.
Map<String, Object> params = new HashMap<>();
for (int i=0; i < parameters.length; i++) {
Object param = parameters[i];
Expand Down