Skip to content

Step #4 : Query Parsing, Serializing, Executing, Mapping results on custom Scala Types (DatomicData)

sadache edited this page Oct 18, 2012 · 1 revision
q2("""
  [ :find ?e ?n 
    :where  [ ?e :person/name ?n ] 
            [ ?e :person/character :person.character/violent ]
  ]
""").collect {
  case List(e: DLong, n: DString) => 
    val entity = database.entity(e.value)
    println("Q2 entity: "+ e + " name:"+n+ " - e:" + entity.get(":person/character"))
}