Module Lafcadio
In: lafcadio/domain.rb

Lafcadio is an object-relational mapping library for Ruby. It currently supports MySQL and PostgreSQL. Its design has a few aspects in mind:

  • The importance of unit-testing. Lafcadio includes a MockObjectStore which can take the place of the ObjectStore for unit tests, so you can test complex database-driven logic. Committing domain objects, running queries, and even triggers can all be written in the Lafcadio level, meaning that they can all be tested without hitting a live database.
  • Dealing with databases in the wild. Lafcadio excels at grappling with pre-existing database schemas and all the odd ways the people use databases in the wild. It requires very little from your schema, except for the fact that each table needs a single numeric primary key. It makes many assumptions about your naming conventions, but these assumptions can all be overridden.

First-time users are recommended to read the tutorial at

Classes and Modules

Module Lafcadio::DomainComparable
Module Lafcadio::DomainMock
Class Lafcadio::BinaryField
Class Lafcadio::BooleanField
Class Lafcadio::DateField
Class Lafcadio::DateTimeField
Class Lafcadio::DomainObject
Class Lafcadio::DomainObjectField
Class Lafcadio::DomainObjectProxy
Class Lafcadio::EmailField
Class Lafcadio::EnumField
Class Lafcadio::FieldMatchError
Class Lafcadio::FloatField
Class Lafcadio::IntegerField
Class Lafcadio::LafcadioConfig
Class Lafcadio::MapObject
Class Lafcadio::MissingError
Class Lafcadio::MockObjectStore
Class Lafcadio::MonthField
Class Lafcadio::ObjectField
Class Lafcadio::ObjectStore
Class Lafcadio::Query
Class Lafcadio::StateField
Class Lafcadio::StringField
Class Lafcadio::TextListField


Version = "0.9.3"