php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #70950 Make SQLite3 Online Backup API available
Submitted: 2015-11-20 13:11 UTC Modified: 2019-06-17 21:43 UTC
Votes:8
Avg. Score:4.4 ± 0.7
Reproduced:8 of 8 (100.0%)
Same Version:2 (25.0%)
Same OS:2 (25.0%)
From: dexen dot devries at gmail dot com Assigned: cmb (profile)
Status: Closed Package: SQLite related
PHP Version: 5.6.15 OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: dexen dot devries at gmail dot com
New email:
PHP Version: OS:

 

 [2015-11-20 13:11 UTC] 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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-09-02 19:47 UTC] 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?
 [2019-06-17 21:43 UTC] cmb@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: cmb
 [2019-06-17 21:43 UTC] cmb@php.net
PR #3617 has been merged, so I consider this feature request
implemented.

[1] <https://github.com/php/php-src/pull/3617>
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Nov 27 06:01:27 2024 UTC