Version 2 of ORM

Updated 2010-05-16 21:14:14 by dkf

ORM is an Object–Relational database Mapper, being worked on by DKF.

Currently, it's available in the half-bakery only. It lacks a number of key features, such as the ability to tell if the database has been changed under its feet.

Documentation

[You've got to be joking?!]

Example

package require tdbc::sqlite3
package require ORM

ORM::Database create db [tdbc::sqlite3::connection new "/path/to/mydatabase.sqlite3"] {
    order:customer  customers:id
    order:dispatch  dispatch:id
}

foreach o [MyDatabase table order findAll] {
    puts "Order: [$o id]"
    puts "Customer: [[$o customer] firstname] [[$o customer] surname]"
    puts "Address: [[$o dispatch] house] [[$o dispatch] street]"
    puts "Address: [[$o dispatch] city], [[$o dispatch] state]"
    puts "Description:\n\t[$o description]"
}