mirror of
https://github.com/logos-storage/nim-datastore.git
synced 2026-01-08 08:33:10 +00:00
include SQL statement in error messages of checkColMetadata
This commit is contained in:
parent
a73c58c632
commit
18df425b09
@ -102,11 +102,13 @@ proc checkColMetadata(s: RawStmtPtr, i: int, expectedName: string) =
|
||||
colName = sqlite3_column_origin_name(s, i.cint)
|
||||
|
||||
if colName.isNil:
|
||||
raise (ref Defect)(msg: "no column exists for index " & $i)
|
||||
raise (ref Defect)(msg: "no column exists for index " & $i & " in `" &
|
||||
$sqlite3_sql(s) & "`")
|
||||
|
||||
if $colName != expectedName:
|
||||
raise (ref Defect)(msg: "original column name for index " & $i & " was \"" &
|
||||
$colName & "\" but expected \"" & expectedName & "\"")
|
||||
$colName & "\" in `" & $sqlite3_sql(s) & "` but callee expected \"" &
|
||||
expectedName & "\"")
|
||||
|
||||
proc idCol*(
|
||||
s: RawStmtPtr,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user