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.

Kansas is currently ALPHA software, but is being used regularly and
effectively, and with the coming addition of a few more features,
will be transitioning to BETA.  The API is not likely to change
in major incompatible ways, but there will definitely be some useful
additions soon.

There is documentation and a tutorial in progress at:

http://enigo.com/projects/kansas/index.html

Comments are welcome.  khaines@enigo.com

Kansas was originally written by Avi Bryant (2002), and is currently
being worked on by Kirk Haines.  The package currently uses
the Ruby license.

