diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2016-11-21 12:04:33 +0100 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2016-11-21 12:10:44 +0100 |
commit | fa101a722f80646bcbf86b94b4c2ce2a4dce93a8 (patch) | |
tree | d94ebd853d1d85560bb64599b55bf8eecbe76c30 /lib/wrappers | |
parent | 4711f6c3985b54bfab0e1b6a3b239ba7cf0d57a7 (diff) | |
download | Nim-fa101a722f80646bcbf86b94b4c2ce2a4dce93a8.tar.gz |
updated sqlite3 wrapper slightly
Diffstat (limited to 'lib/wrappers')
-rw-r--r-- | lib/wrappers/sqlite3.nim | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/wrappers/sqlite3.nim b/lib/wrappers/sqlite3.nim index e7fd2bc36..d76fb61ad 100644 --- a/lib/wrappers/sqlite3.nim +++ b/lib/wrappers/sqlite3.nim @@ -96,10 +96,6 @@ const #define SQLITE_TRANSIENT ((void(*)(void *))-1) SQLITE_DETERMINISTIC* = 0x800 -const - SQLITE_STATIC* = nil - SQLITE_TRANSIENT* = cast[pointer](- 1) - type Sqlite3 {.pure, final.} = object PSqlite3* = ptr Sqlite3 @@ -132,6 +128,10 @@ type Tresult_func: Result_func, Tcreate_collation_func: Create_collation_func, Tcollation_needed_func: Collation_needed_func].} +const + SQLITE_STATIC* = nil + SQLITE_TRANSIENT* = cast[Tbind_destructor_func](- 1) + proc close*(para1: PSqlite3): int32{.cdecl, dynlib: Lib, importc: "sqlite3_close".} proc exec*(para1: PSqlite3, sql: cstring, para3: Callback, para4: pointer, errmsg: var cstring): int32{.cdecl, dynlib: Lib, @@ -234,7 +234,8 @@ proc bind_parameter_name*(para1: Pstmt, para2: int32): cstring{.cdecl, dynlib: Lib, importc: "sqlite3_bind_parameter_name".} proc bind_parameter_index*(para1: Pstmt, zName: cstring): int32{.cdecl, dynlib: Lib, importc: "sqlite3_bind_parameter_index".} - #function sqlite3_clear_bindings(_para1:Psqlite3_stmt):longint;cdecl; external Sqlite3Lib name 'sqlite3_clear_bindings'; +proc clear_bindings*(para1: Pstmt): int32 {.cdecl, + dynlib: Lib, importc: "sqlite3_clear_bindings".} proc column_count*(pStmt: Pstmt): int32{.cdecl, dynlib: Lib, importc: "sqlite3_column_count".} proc column_name*(para1: Pstmt, para2: int32): cstring{.cdecl, dynlib: Lib, |