Req #70950 [Opn]: Make SQLite3 Online Backup API available

From: Date: Fri, 02 Sep 2016 19:47:54 +0000
Subject: Req #70950 [Opn]: Make SQLite3 Online Backup API available
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-203758@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
 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)

« previous php.bugs (#203758) next »