PHP code example of sikker / notnosql

1. Go to this page and download the library: Download sikker/notnosql library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

sikker / notnosql example snippets




sql = new Sikker\NotNoSQL\NotNoSQL( new PDO('sqlite:database.sqlite3') );
$notnosql->put('foo', 'bar');
echo $notnosql->get('foo') . PHP_EOL;

$notnosql->put('beef.stroganoff.attr.country', ['unknown', 'unknown', 'THE EMPIRE!']);
var_dump($notnosql->get('beef.stroganoff.attr.country'));

$notnosql->put('beef.stroganoff.chef', 'Bender');
$notnosql->put('beef.stroganoff.customer', 'Fry');

$notnosql->get('beef.stroganoff'); // returns ['chef' => 'Bender', 'customer' => 'Fry']

$notnosql->put('deliveries', []);
$notnosql->add('deliveries', ['from' => 'Nixon', 'to' => 'Lrrr, Ruler of Omicron Persei 8']);
$notnosql->add('deliveries', ['from' => 'Russia', 'with' => 'love']);

$notnosql->delete('beef.stroganoff');

$notnosql->put('deliveries', []);