Most kawaii and simplest database abstraction layer ever
Nightfly 5387e45b68 backport from Ubilling upstream | 1 month ago | |
---|---|---|
api | 1 month ago | |
config | 5 years ago | |
exports | 5 years ago | |
.gitignore | 5 years ago | |
.travis.yml | 4 years ago | |
LICENSE | 5 years ago | |
README.md | 4 years ago | |
cli_routing_sample.php | 4 years ago | |
sample.php | 5 years ago | |
tests.php | 4 years ago |
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