Req #70950 [Opn]: Make SQLite3 Online Backup API available
Edit report at https://bugs.php.net/bug.php?id=70950&edit=1
ID: 70950
Updated by: cmb@php.net
Reported by: dexen dot devries at gmail dot com
Summary: Make SQLite3 Online Backup API available
Status: Open
Type: Feature/Change Request
Package: SQLite related
PHP Version: 5.6.15
Block user comment: N
Private report: N
New Comment:
I'm on the fence whether it would be better to expose the full API
or just a single method (say, SQLite3::backupFrom(SQLite3
$source)). The former would have obvious advantages for large
databases, but the latter would be sufficient for small databases
(in particular loading and saving in-memory databases), and would
be much more easier to implement and use, and therefore less
error-prone.
Thoughts?
Previous Comments:
------------------------------------------------------------------------
[2015-11-20 13:11:03] dexen dot devries at gmail dot com
Description:
------------
SQLite3 provides Online Backup API (https://www.sqlite.org/backup.html) for copying databases in
safe way. Please expose the API through the SQLite3 extension.
Test script:
---------------
$source = SQLite3('original.sqlite');
$dest = SQLite3('backup.sqlite');
# equivalent of C sqlite3_backup_init()
$backup = new SQLite3Backup($dest, $source);
# equivalent of C sqlite3_backup_step()
$backup->step($npages = -1);
# equivalent of C sqlite3_backup_finish
$backup->finish();
echo 'backup complete.';
Expected result:
----------------
backup complete.
Actual result:
--------------
class SQLite3Backup does not exist
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=70950&edit=1
Thread (3 messages)