File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -13,20 +13,18 @@ export function nativeToCypher (x) {
1313 if ( Number . isInteger ( x ) ) {
1414 return valueResponse ( 'CypherInt' , x )
1515 }
16- break
16+ return valueResponse ( 'CypherFloat' , x )
1717 case 'string' :
1818 return valueResponse ( 'CypherString' , x )
1919 case 'boolean' :
2020 return valueResponse ( 'CypherBool' , x )
2121 case 'object' :
22- console . log ( x )
2322 if ( neo4j . isInt ( x ) ) {
2423 // TODO: Broken!!!
2524 console . log ( x )
2625 return valueResponse ( 'CypherInt' , x . toInt ( ) )
2726 }
2827 if ( Array . isArray ( x ) ) {
29- const values = x . map ( nativeToCypher )
3028 return valueResponse ( 'CypherList' , values )
3129 }
3230 if ( x instanceof neo4j . types . Node ) {
@@ -61,9 +59,13 @@ export function cypherToNative (c) {
6159 case 'CypherInt' :
6260 return value
6361 case 'CypherFloat' :
64- return value + 0.0
62+ return value
6563 case 'CypherNull' :
6664 return value
65+ case 'CypherBool' :
66+ return value
67+ case 'CypherList' :
68+ return value . map ( cypherToNative )
6769 }
6870 console . log ( `Type ${ name } is not handle by cypherToNative` , c )
6971 const err = 'Unable to convert ' + c + ' to native type'
You can’t perform that action at this time.
0 commit comments