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