Database abstraction/adapters for ruby

Posted by Stiivi on Stack Overflow See other posts from Stack Overflow or by Stiivi
Published on 2010-05-31T09:40:00Z Indexed on 2010/05/31 9:42 UTC
Read the original article Hit count: 223

Filed under:
|
|
|

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?

© Stack Overflow or respective owner

Related posts about sql

Related posts about ruby