Most kawaii and simplest database abstraction layer ever

Nightfly 5387e45b68 backport from Ubilling upstream преди 1 месец
api 5387e45b68 backport from Ubilling upstream преди 1 месец
config 6de9164677 starting backporting преди 5 години
exports 8fe79a74f9 exports here преди 5 години
.gitignore 8fe79a74f9 exports here преди 5 години
.travis.yml c570c10711 added travis basic checks преди 4 години
LICENSE 2484ea4e73 Initial commit преди 5 години
README.md 138f5fcb90 contributing notice преди 4 години
cli_routing_sample.php b8db83fcff lolz преди 4 години
sample.php 1885c6819d basically backported from Ubilling преди 5 години
tests.php 62760ada4d fixed some compat errors, empty cli options handling, added basic testing преди 4 години

README.md

NyanORM

Most kawaii and simplest database abstraction layer ever

Features

  • It does not impose any restrictions on the naming of database tables
  • It does not dictate any conditions for the fields and content of these tables
  • Allows you to work with existing data structures without any problems
  • Allows you to mix code both with its use and in the old raw style
  • It does not require a long and boring describing of models before starting to work
  • Ideal for ultrafast prototyping of business logic of applications
  • Written in as minimal a style as possible using the simplest mechanics
  • Minimizes overheads for memory and callbacks. May be.
  • Allows inheritance to modify any model as you wish and the methods of working with it do not limit itself at all
  • It does not provide any requirements and tools for filtering data. You can use whatever you want
  • Works equally well on PHP5 and PHP7. Legacy!
  • Acceptable for use in web or CLI applications.
  • The most obvious syntax and mechanics that require a minimum level of IQ for their understanding
  • High level of kawaii

Few Usage examples

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

Please check out some usage guidelines

Contribute

  1. Fork the repository on GitHub to start making your changes.
  2. Make code changes to implement the feature or fix the bug.
  3. Send a pull request to get your changes merged and published.

NYA!

Build Status