[plt-scheme] Resources in the transformer environment

From: Noel Welsh (noelwelsh at yahoo.com)
Date: Fri Oct 27 05:30:51 EDT 2006

--- Jon Zeppieri <zeppieri at gmail.com> wrote:

> I've been playing around with class.ss, attempting to
> implement
> something similar to Ruby's ActiveRecord class, which
> provides an
> automatic mapping between a class and a relational
> database table.

Interesting.  We've taken the opposite approach, generating
the database tables from the Scheme definitions (seems a
better way around to me, as well as making the
implementation easier).  E.g. you define:

   (define-persistent-struct course 
    (code   type:symbol) 
    (name   type:text)
    (value  type:integer)
    (active type:boolean)
    (start  type:time-tai))

and can then call 

  (create-table entity:course) 

to initialise the database

If you want to compare and contrast, our code is here:

  http://svn.untyped.com/snooze/branches/dbms/

We support PostgreSQL and SQLite backends at the moment. 
Where the documentation is lacking, consults the tests.

Cheers,
Noel


Email: noelwelsh <at> yahoo <dot> com   noel <at> untyped <dot> com
AIM: noelhwelsh
Blogs: http://monospaced.blogspot.com/  http://www.untyped.com/untyping/

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


Posted on the users mailing list.