Search code examples
zend-frameworksqlitememoryzend-dbdump

How to get binary dump of SQLite memory db


If i have code like this

$dbSL = Zend_Db::factory('pdo_sqlite', array('dbname'=>':memory:'));

$dbSL->query('CREATE TABLE ...');
$dbSL->query('CREATE TABLE ...');

...

After that i whant take binary dump of this SQLite db

Thx in advice!


Solution

  • Take a look at this thread on Nabble. You can use the ATTACH command to save a :memory: DB to disk, but if you're only working in memory to gain speed, they make a few suggestions about reducing error checking to gain speed as well.