- Minor README updates. - Create LICENSE and History files. - Use 'func' instead of 'proc' where applicable. - Add some destructor debug. - Rename primary exceptions to 'X-error'. - Bind to proper object types in prepared statement parameters. - Retain the found 'type' in the KuzuValue object. FossilOrigin-Name: db59c0b901b1715170e0d269fc2bf00477ac48af4d10a747eb5a749adbf6268e
20 lines
450 B
Nim
20 lines
450 B
Nim
# vim: set et sta sw=4 ts=4 :
|
|
|
|
import
|
|
std/re
|
|
import kuzu
|
|
|
|
let db = newKuzuDatabase()
|
|
let conn = db.connect
|
|
|
|
var q = conn.query( "CREATE NODE TABLE Doop ( id SERIAL, thing STRING, PRIMARY KEY(id) )" )
|
|
|
|
var p = conn.prepare( "CREAET (d:Doop {thing: $thing})" )
|
|
assert typeOf( p ) is KuzuPreparedStatement
|
|
|
|
try:
|
|
discard p.execute
|
|
except KuzuQueryError as err:
|
|
assert err.msg.contains( re"""Parser exception: extraneous input 'CREAET'""" )
|
|
|
|
|