Rename the project to nim-ladybug, after kuzu's sudden October abandoning. Picked up by a new party under the new name, lets see where this goes!
No new functionality, just rename and docs updates.
This commit is contained in:
parent
ee0e8a72c0
commit
76718fa49f
61 changed files with 3030 additions and 2998 deletions
|
|
@ -2,30 +2,30 @@
|
|||
|
||||
import
|
||||
std/re
|
||||
import kuzu
|
||||
import lbug
|
||||
|
||||
let db = newKuzuDatabase()
|
||||
let db = newLbugDatabase()
|
||||
let conn = db.connect
|
||||
|
||||
var q = conn.query( "CREATE NODE TABLE Doop ( id SERIAL, created DATE, PRIMARY KEY(id) )" )
|
||||
assert typeOf( q ) is KuzuQueryResult
|
||||
assert typeOf( q ) is LbugQueryResult
|
||||
|
||||
var p = conn.prepare( "CREATE (d:Doop {created: $created})" )
|
||||
assert typeOf( p ) is KuzuPreparedStatement
|
||||
assert typeOf( p ) is LbugPreparedStatement
|
||||
|
||||
# Typecast binding failure
|
||||
#
|
||||
try:
|
||||
discard p.execute( (created: "1111-1111") )
|
||||
except KuzuQueryError as err:
|
||||
assert err.msg.contains( re"""Expression \$created has data type STRING but expected DATE.""" )
|
||||
except LbugQueryError as err:
|
||||
assert err.msg.contains( re"""Conversion exception: Error occurred during parsing date.""" )
|
||||
|
||||
# Invalid value for typecast
|
||||
#
|
||||
p = conn.prepare( "CREATE (d:Doop {created: DATE($created)})" )
|
||||
try:
|
||||
discard p.execute( (created: "1111-1111") )
|
||||
except KuzuQueryError as err:
|
||||
except LbugQueryError as err:
|
||||
assert err.msg.contains( re"""Given: "1111-1111". Expected format: \(YYYY-MM-DD\)""" )
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue