Most kawaii and simplest database abstraction layer ever
Nightfly 5387e45b68 backport from Ubilling upstream | пре 1 месец | |
---|---|---|
api | пре 1 месец | |
config | пре 5 година | |
exports | пре 5 година | |
.gitignore | пре 5 година | |
.travis.yml | пре 4 година | |
LICENSE | пре 5 година | |
README.md | пре 4 година | |
cli_routing_sample.php | пре 4 година | |
sample.php | пре 5 година | |
tests.php | пре 4 година |
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