Skip to content

Instantly share code, notes, and snippets.

@sarmbruster
Created September 21, 2015 09:01
Show Gist options
  • Save sarmbruster/cf2da54ea9a2d5dc4cc6 to your computer and use it in GitHub Desktop.
Save sarmbruster/cf2da54ea9a2d5dc4cc6 to your computer and use it in GitHub Desktop.
// short snippet to retrieve the type of a given property in cypher
CREATE (x {myProp: 1.2}) // create a sample node with a float property, change the value to whatever you like
RETURN
CASE x.myProp
WHEN toString(x.myProp) THEN "STRING"
WHEN toFloat(x.myProp) THEN "FLOAT"
WHEN toInt(x.myProp) THEN "INTEGER"
END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment