Lafcadio


Table of Contents

1. Introduction
2. Installation
Installation overview
Install MySQL/Ruby (or Ruby/MySQL)
Install Ruby-DBI
Install Lafcadio
... with RubyGems
... without RubyGems
Test Lafcadio (optional)
3. Tutorial
Create a configuration file
Create a table, and corresponding domain class
Create, update, and delete Users
Create a new user and save it to the database
Retrieve a user and change some values
Delete the user
Add methods to the User class
Record an association between Users and Messages
Query Users
4. Matching database tables to domain classes
Defining domain class fields
binary
boolean
date
date_time
domain_object
email
enum
float
integer
month
state
string
text_list
Naming assumptions, and how to override them
Domain class inheritance
5. Using domain classes
Inserting, updating, and deleting
Dynamic associations
Triggers
6. Querying
Building and accessing queries
Query inference operators
Numerical comparisons: lt, lte, gte, gt
Equality: equals
Inclusion: in and include?
Text comparison: like
Compound conditions: & and |
Negation: not
Hands-on query construction
Query caching via subset matching
Eager loading
7. Testing
Setting up testing in a Lafcadio-based program
Domain objects in test cases
Quicker ways to setup mock objects
8. Advanced ObjectStore tricks
Transactions
The ObjectStore cache
9. Credits