NoSQLite – simple key => value store based on SQLite3
NoSQLite is simple key-value store using SQLite as raw data store. Mainly for small project where MySQL is too heavy and files are too ugly.
- PHP >=5.3.2
- PDO (by default as of PHP 5.1.0)
- PDO_SQLITE (by default as of PHP 5.1.0)
How to use
Create stores' manager (file will be created if not exists)
$nsql = new NoSQLite\NoSQLite('mydb.sqlite');
$store = $nsql->getStore('movies');
Set value in store (key and value max length are limited by SQLite TEXT datatype)
$store->set(uniqid(), json_encode(array('title' => 'Good Will Hunting', 'director' => 'Gus Van Sant'));
Get value from store (will be created if not exists)
Get all values
Delete all values
(The MIT License)
Copyright (c) 2011 Maciej Winnicki http://maciejwinnicki.pl/
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.