Database abstraction/adapters for ruby
- by Stiivi
What are the database abstractions/adapters you are using in Ruby? I am mainly interested in data oriented features, not in those with object mapping (like active record or data mapper).
I am currently using Sequel. Are there any other options?
I am mostly interested in:
simple, clean and non-ambiguous API
data selection (obviously), filtering and aggregation
raw value selection without field mapping: SELECT col1, col2, col3 = [val1, val2, val3] not hash of { :col1 = val1 ...}
API takes into account table schemas 'some_schema.some_table' in a consistent (and working) way; also reflection for this (get schema from table)
database reflection: get list of table columns, their database storage types and perhaps adaptor's abstracted types
table creation, deletion
be able to work with other tables (insert, update) in a loop enumerating selection from another table without requiring to fetch all records from table being enumerated
Purpose is to manipulate data with unknown structure at the time of writing code, which is the opposite to object mapping where structure or most of the structure is usually well known. I do not need the object mapping overhead.
What are the options, including back-ends for object-mapping libraries?