Most kawaii and simplest database abstraction layer ever
Nightfly 5387e45b68 backport from Ubilling upstream | hai 1 mes | |
---|---|---|
api | hai 1 mes | |
config | %!s(int64=5) %!d(string=hai) anos | |
exports | %!s(int64=5) %!d(string=hai) anos | |
.gitignore | %!s(int64=5) %!d(string=hai) anos | |
.travis.yml | %!s(int64=4) %!d(string=hai) anos | |
LICENSE | %!s(int64=5) %!d(string=hai) anos | |
README.md | %!s(int64=4) %!d(string=hai) anos | |
cli_routing_sample.php | %!s(int64=4) %!d(string=hai) anos | |
sample.php | %!s(int64=5) %!d(string=hai) anos | |
tests.php | %!s(int64=4) %!d(string=hai) anos |
Most kawaii and simplest database abstraction layer ever
Creating model for database table "devices" with some kind of magic:
$devices=new nya_devices();
Retrieving all data from it:
$allDevices=$devices->getAll();
Filtering data before selecting data:
$devices->where('id','=','42');
Creating new device
$devices->data('name','device name');
$devices->data('price','50');
$devices->create();
Changing some device record:
$devices->data('name','newname');
$devices->where('id','=','42');
$devices->save();
Deleting device record:
$devices->where('id','=','42');
$devices->delete();
....and many many other things