An open API service indexing awesome lists of open source software.

https://github.com/ubermanu/donnee

🍩 Tiny database abstraction based on "sed"
https://github.com/ubermanu/donnee

database key-value php sed

Last synced: 2 months ago
JSON representation

🍩 Tiny database abstraction based on "sed"

Awesome Lists containing this project

README

          

# Donnée

Tiny database abstraction based on sed

## Install

```shell
composer require ubermanu/donnee
```

## Usage

```php
$db = new \Donnee\Donnee('file.txt');

$insertedId = $db->insert('some string');
// 1

echo $db->get(1);
// 'some string'

$db->update(1, 'new string');
echo $db->get(1);
// 'new string'

$db->delete(1);
var_dump($db->get(1));
// null
```

## Tests

```shell
vendor/bin/phpunit
```