2 // SQLite PearDB backend by Matthew Palmer
3 // The SQLite DB will gain popularity with the current MySQL vs PHP license drama.
4 rcs_id('$Id: PearDB_sqlite.php,v 1.1 2004-03-17 14:40:37 rurban Exp $');
6 require_once('lib/WikiDB/backend/PearDB.php');
8 class WikiDB_backend_sqlite
9 extends WikiDB_backend_PearDB
21 function _lock_tables($write_lock = true) {
22 // NOP - SQLite does all locking automatically
28 function _unlock_tables() {
35 function _serialize($data) {
38 assert(is_array($data));
39 return base64_encode(serialize($data));
45 function _unserialize($data) {
48 // Base64 encoded data does not contain colons.
49 // (only alphanumerics and '+' and '/'.)
50 if (substr($data,0,2) == 'a:')
51 return unserialize($data);
52 return unserialize(base64_decode($data));
56 // (c-file-style: "gnu")
61 // c-hanging-comment-ender-p: nil
62 // indent-tabs-mode: nil