RAA - criteria

criteria / 1.1a

Short description: SQL query abstraction, and others
Category: Library/Database
Status: stable
Created: 2003-09-08 07:27:24 GMT
Last update: -
Owner: Ryan Pavlik (Projects of this owner)
Homepage: http://mephle.org/Criteria/
Download: http://mephle.org/Criteria/criteria-1.1a.tar.gz
License: LGPL
Dependency:
None
Description:

Criteria is a module for abstracting queries to various data sets. For instance, you might have a flat text file, or an array of Ruby objects, or a SQL database, and wish to perform the same query on any given source, without different versions of code for each. Here's a quick example (more on the site):

idx1 = SQLTable.new("orders")
q1 = (idx1.price > idx1.paid) & (idx1.duedate < Time.now.to_i)

puts q1.select

# => SELECT * FROM orders WHERE ((orders.price > orders.paid) AND
# (orders.duedate < 1062616643))

Changes (1.1a): Last minute bugfix, see README.
Changes (1.1): SQL abstraction now includes CREATE TABLE, INSERT, UPDATE, DELETE, and DROP TABLE. Parameterized queries added. FileTable sorting fixed. See ChangeLog for complete details.

Edit this project (for project owner)

back to RAA top