ANN: Kansas 0.0.4 released

K

Kirk Haines

Version 0.0.4 of Kansas has been released. This one fixes a few bugs,
including one that caused problems with DBD::pg. It also now uses
forwardable to support DBI::StatementHandle method calls via it's internal
database handle. This makes it easy to step out of Kansas in order to use
the database handle directly if you are doing something that is outside of
what Kansas supports.

Kansas can be found at RubyForge: http://rubyforge.org/projects/kansas
There is documentation in progress at http://enigo.com/projects/kansas

If you don't know what Kansas is:

-----
Kansas is a simple Object-Relational mapping layer for Ruby. It takes
a relational schema, accessible via Ruby's DBI layer, and converts it
in to a set of Ruby classes, one per table. Each class contains a set
of accessors corresponding to the columns in the table. So, given a
table:

create table CoursesTaken (
name char(30) not null,
student_number int(8) not null,
primary key (name, student_number)
);

Kansas would create a class 'CoursesTaken', containing read and write
attributes called 'name' and 'student_number'.

Kansas also let's you define the joins between tables (which can be
one-to-one or one-to-many). If you access a join in a table, Kansas
automatically loads the row in the referenced table, returning the
appropriate object.

If you assign to a row attribute, Kansas updates the corresponding
field in the database. In the default mode, this update is
immediate. Setting autocommit off makes Kansas keep all changes
pending until a commit is issued. When autocommit is off, changes
can also be rolled back, preventing them from being written to the
database.
-----

As always, I appreciate comments, especially if you are going to use it
with a database other than MySQL. In theory it should work with any
database that DBI works with, but that theory is far from tested.


Thanks,

Kirk Haines
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top