Skip to content
World Wide Web Server edited this page Jul 4, 2012 · 11 revisions

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]

  1. PHP v.5.2.x
  2. CodeIgniter v.2.x.x

[h3]Features[/h3]

  1. Supported databases : cubrid, mssql, mysql, oci8, odbc, postgre, sqlite, sqlsrv.
  2. Support multiple database connection.
  3. Multiple relationship (has_one, has_many, belongs_to, has_and_belongs_to) with custom relationship setting (through, foreign_key, foreign_table)
  4. Various finder method (can chained with most of CI AR) and aggregates.
  5. Validation and auto-mapping input collection, with minimal setup.
  6. Hooks points, to control over your model.
  7. Transaction, cache, and other CI AR goodness.

[h3]Planned Features[/h3]

  1. Auto-create and auto-synchronize tables (utilize Migration)
  2. Support for hierarchical data (tree traversal)
  3. 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

Clone this wiki locally