This page describes a modified version of the great ActiveRecord Class library.
Modifications made
[ul]
[li]The discover_table_columns() method and all caching logic were ditched. Why? First of all, CI has a nice $this->db->list_fields(‘table_name’) method which does the same in a cross-database-implementation way. Secondly, there is a $query->list_fields() method which returns an array of field names from your query object without making any additional queries. All in all, performance-wise you save one file read and lose one “SHOW COLUMNS FROM…” query for each table you .save() or .update() (but not .create() or .find_*()). Some hacky benchmarking’s shown no difference, but the library got cleaner and there is no more “OMG, I changed my DB structure, but the old one stuck in the cache, and I forgot about that!”[/li]
[/ul]
Download
Download Version 0.3.2 of this library.
