limited_update_conditions

limited_update_conditions(where_sql, quoted_table_name, quoted_primary_key) Instance Public methods

reset_sequence!

reset_sequence!(table, column, sequence = nil) Instance Public methods Set the sequence to the max value of the table's column.

rollback_db_transaction

rollback_db_transaction() Instance Public methods Rolls back the transaction (and turns on auto-committing). Must be done if the transaction block raises an exception or returns false.

sanitize_limit

sanitize_limit(limit) Instance Public methods Sanitizes the given LIMIT parameter in order to prevent SQL injection. The limit may be anything that can evaluate to a string via to_s. It should look like an integer, or a comma-delimited list of integers, or an Arel SQL literal. Returns Integer and Arel::Nodes::SqlLiteral limits as is. Returns the sanitized limit parameter, either as an integer, or as a string which contains a comma-delimited list of integers.

select_all

select_all(arel, name = nil, binds = []) Instance Public methods Returns an ActiveRecord::Result instance.

select_one

select_one(arel, name = nil, binds = []) Instance Public methods Returns a record hash with the column names as keys and column values as values.

select_rows

select_rows(sql, name = nil, binds = []) Instance Public methods Returns an array of arrays containing the field values. Order is the same as that returned by columns.

select_value

select_value(arel, name = nil, binds = []) Instance Public methods Returns a single value from a record

select_values

select_values(arel, name = nil) Instance Public methods Returns an array of the values of the first column in a select: select_values("SELECT id FROM companies LIMIT 3") => [1,2,3]

supports_statement_cache?

supports_statement_cache?() Instance Public methods Returns true when the connection adapter supports prepared statement caching, otherwise returns false