db-backed is a Ruby library providing a convenient mechanism for describing objects bound to a backing database. This relieves the programmer from much of the tedium associated with writing programs with DB access. Instead of spending a lot of time working on code that reads data from the database, code that stuffs it into useable objects, remembering whether a particular piece of data lives in the database or not, etc., db-backed allows the programmer to simply design their database schema (with a few constraints), and write a very simple class definition which describes the mapping between database fields, class methods, and foreign key mappings.
|Tags||Software Development Libraries Ruby Modules Database|
Release Notes: This version adds the ability to have DB backed classes in separate namespaces (modules). Foo::Bar will be properly trimmed to Bar.
Release Notes: The DBBackedClass#hash method conflicted with Object's hash method, which should return a unique hash. Therefore, it's been renamed to hashtable, to be more explicit and safer.
Release Notes: This is a minor change over 0.9. Some things have been fixed, and the optional WHERE clause has been extended to a more general modifier clause (when instantiating objects). This will probably have no impact on any code you've written.
Release Notes: Classes can now be declared cacheable. All instantiations by record_id will pass through cache (fetchAll(), random(), and backref fetches will not, though the results will be cached for future use as previously explained).
Release Notes: This version adds an installer (install.rb) along with the ability to count a db-backed class store (Track.count) and the ability to fetch a random instance (Track.random).