drwrf / mismatch-orm
A simple library for complex SQL.
0.3.3
2014-11-22 21:14 UTC
Requires
- php: >=5.4
- doctrine/dbal: ~2.4
- doctrine/inflector: ~1
- drwrf/mismatch-model: ~0.1
Requires (Dev)
- d11wtq/boris: dev-master
- mockery/mockery: 0.9
- phpunit/php-code-coverage: 2.0.*@dev
- phpunit/phpunit: 4.0.*@dev
- phpunit/phpunit-mock-objects: 2.0.*@dev
README
███╗ ███╗██╗███████╗███╗ ███╗ █████╗ ████████╗ ██████╗██╗ ██╗ ████╗ ████║██║██╔═══ █╔══╝██╔════╝██║ ██║╗ ██╔████╔██║██║██████ Mismatch\ORM █║ ██║ ███████║╝ ██║╚██╔╝██║██║╚════█_________________________█║ ██║ ██╔══██║╗ ██║ ╚═╝ ██║██║███████║██║ ╚═╝ ██║██║ ██║ ██║ ╚██████╗██║ ██║╝ ╚═╝ ╚═╝╚═╝╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝ A S I M P L E L I B R A R Y F O R C O M P L E X S Q L ╚═════════════════════════════════════════════════════════════╝ The goal of Mismatch\ORM is to make building and executing SQL queries dead simple. It optimizes for the common scenarios, while allowing you to fall back to straight SQL when necessary. You see, SQL is actually pretty good at its job and you really shouldn't have to work around your ORM to get at it. Let's take a look. ~ <?php use Mismatch\ORM\Query; use Mismatch\ORM\Expression as e; $authors = (new Query($conn, 'authors')) ->order('name', 'asc') ->where([ 'signup' => e\after('2014-04-01') 'active' => true, ]); foreach ($authors as $author) { // It's pretty easy }