diff --git a/lib/wrappers/sqlite3.nim b/lib/wrappers/sqlite3.nim index b96a70ef33b0c..f4ec6180f0b0e 100644 --- a/lib/wrappers/sqlite3.nim +++ b/lib/wrappers/sqlite3.nim @@ -110,6 +110,9 @@ type Sqlite3 {.pure, final.} = object PSqlite3* = ptr Sqlite3 PPSqlite3* = ptr PSqlite3 + Sqlite3_Backup {.pure, final.} = object + PSqlite3_Backup* = ptr Sqlite3_Backup + PPSqlite3_Backup* = ptr PSqlite3_Backup Context{.pure, final.} = object Pcontext* = ptr Context TStmt{.pure, final.} = object @@ -366,6 +369,20 @@ proc version*(): cstring{.cdecl, mylib, importc: "sqlite3_libversion".} # Not published functions proc libversion_number*(): int32{.cdecl, mylib, importc: "sqlite3_libversion_number".} + +proc backup_init*(pDest: PSqlite3, zDestName: cstring, pSource: PSqlite3, zSourceName: cstring): PSqlite3_Backup {. + cdecl, mylib, importc: "sqlite3_backup_init".} + +proc backup_step*(pBackup: PSqlite3_Backup, nPage: int32): int32 {.cdecl, mylib, importc: "sqlite3_backup_step".} + +proc backup_finish*(pBackup: PSqlite3_Backup): int32 {.cdecl, mylib, importc: "sqlite3_backup_finish".} + +proc backup_pagecount*(pBackup: PSqlite3_Backup): int32 {.cdecl, mylib, importc: "sqlite3_backup_pagecount".} + +proc backup_remaining*(pBackup: PSqlite3_Backup): int32 {.cdecl, mylib, importc: "sqlite3_backup_remaining".} + +proc sqlite3_sleep*(t: int64): int64 {.cdecl, mylib, importc: "sqlite3_sleep".} + #function sqlite3_key(db:Psqlite3; pKey:pointer; nKey:longint):longint;cdecl; external Sqlite3Lib name 'sqlite3_key'; #function sqlite3_rekey(db:Psqlite3; pKey:pointer; nKey:longint):longint;cdecl; external Sqlite3Lib name 'sqlite3_rekey'; #function sqlite3_sleep(_para1:longint):longint;cdecl; external Sqlite3Lib name 'sqlite3_sleep';