-
Notifications
You must be signed in to change notification settings - Fork 7.6k
GasORM
Category:Libraries | Category:Libraries::Community | Category:Library::Database A lighweight and easy-to-use ORM for CodeIgniter. Gas was built specifically for CodeIgniter app. It uses standard CI DB packages, also take anvantages of its validator class. Gas provide methods that will map your database table and its relation, into accesible object. [h4]For download or recent update, look at [url=http://goo.gl/T5gmI]GasORM @ GitHub[/url]. This library also [url=http://getsparks.org/packages/Gas-ORM/versions/HEAD/show]available at Sparks[/url].[/h4]
[h3]Requirements[/h3]
- PHP v.5.2.x
- CodeIgniter v.2.x.x
[h3]Features[/h3]
- Supported databases : cubrid, mssql, mysql, oci8, odbc, postgre, sqlite, sqlsrv.
- Support multiple database connection.
- Multiple relationship (has_one, has_many, belongs_to, has_and_belongs_to) with custom relationship setting (through, foreign_key, foreign_table)
- Various finder method (can chained with most of CI AR) and aggregates.
- Validation and auto-mapping input collection, with minimal setup.
- Hooks points, to control over your model.
- Transaction, cache, and other CI AR goodness.
[h3]Planned Features[/h3]
- Auto-create and auto-synchronize tables (utilize Migration)
- Support for hierarchical data (tree traversal)
- More useful features, but keep both size and performance for a good use.
[h3]Example Usage[/h3] [code] // FINDER $all = Gas::factory('user')->all()); $some_user = Gas::factory('user')->find_by_username('foo');
// WRITE (INSERT, UPDATE, DELETE) AND VALIDATION $new_user = new User; $new_user->fill($_POST)->save(TRUE);
// RELATIONSHIP & EAGER LOADING $some_user = Gas::factory('user')->with('wife', 'kid', 'job')->find(1)); $some_user_wife = $some_user->wife; [/code]
Comments on those libraries should self explanatory. I write a specific [url=http://taufanaditya.com/gas-orm]post at my blog[/url], for further information regarding this library, in-depth usage, convention and available methods.
[i]Cheers.[/i] Taufan Aditya A.K.A [b]Toopay[/b]
Category:Libraries::Database Category:Contributions::Libraries::Database Category:Models