1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-23 00:43:28 +00:00
freebsd-ports/databases/ruby-criteria/pkg-descr
Akinori MUSHA eaaa4142fb Add ruby-criteria, a Ruby module for SQL query abstraction, and
others.  Note that this module only works with Ruby 1.8 or later.
2003-09-10 09:35:37 +00:00

17 lines
589 B
Plaintext

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))
Author: Ryan Pavlik <rpav@mephle.com>
WWW: http://mephle.org/Criteria/