Req #70950 [Opn->Csd]: Make SQLite3 Online Backup API available
| From: | cmb@php.net | Date: | Mon, 17 Jun 2019 21:43:32 +0000 |
| Subject: | Req #70950 [Opn->Csd]: Make SQLite3 Online Backup API available | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-221352@lists.php.net to get a copy of this message | ||
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
+Status: Closed
Type: Feature/Change Request
Package: SQLite related
PHP Version: 5.6.15
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
PR #3617 has been merged, so I consider this feature request
implemented.
[1] <https://github.com/php/php-src/pull/3617>
Previous Comments:
------------------------------------------------------------------------
[2016-09-02 19:47:54] cmb@php.net
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?
------------------------------------------------------------------------
[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