(Still not working 100%, but getting close.) Additionally, start on the README, fix some type member visibility, add some additional tests, tag some FIXMEs for where type conversions will take place, and add `#rewind` for the query iterator. FossilOrigin-Name: 490f27a4792d5243d82d90dcb12be1074c945c74d7fa63dd5baaf942ac42d7c9
23 lines
512 B
Nim
23 lines
512 B
Nim
# vim: set et sta sw=4 ts=4 :
|
|
|
|
discard """
|
|
output: "Camel\nLampshade\nCamel\nLampshade\n"
|
|
"""
|
|
|
|
import kuzu
|
|
|
|
let db = newKuzuDatabase()
|
|
let conn = db.connect
|
|
|
|
var q = conn.query( "CREATE NODE TABLE Doop ( id SERIAL, thing STRING, PRIMARY KEY(id) )" )
|
|
|
|
for thing in @[ "Camel", "Lampshade" ]:
|
|
q = conn.query( "CREATE (d:Doop {thing: '" & thing & "'})" )
|
|
|
|
for tpl in conn.query( "MATCH (d:Doop) RETURN d.thing" ):
|
|
echo $tpl
|
|
|
|
q.rewind
|
|
|
|
for tpl in conn.query( "MATCH (d:Doop) RETURN d.thing" ):
|
|
echo $tpl
|