Created
December 15, 2014 19:59
-
-
Save AmirHooshangi/c36fbce76cb73c12588a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def exists(name: String): Boolean = { | |
val query = "start n=node(*) where has(n.name) AND n.name=" + "\""+ name + "\"" + " return n" | |
// val query = """start n=node(1) return n, n.name""" | |
var result = true | |
result = withTx { neo => | |
val typedResult = query.execute.asCC[Test_Matrix]("n") | |
println("should return" + typedResult.toList.isEmpty) | |
if(typedResult.toList.isEmpty) { | |
false | |
}else { | |
true} | |
} | |
println("nobody comes here" + result) | |
result | |
} | |
################################## | |
should returnfalse | |
nobody comes herefalse |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment