case_sensitive_modifier

case_sensitive_modifier(node) Instance Public methods

case_insensitive_comparison

case_insensitive_comparison(table, attribute, column, value) Instance Public methods

adapter_name

adapter_name() Instance Public methods Returns the human-readable name of the adapter. Use mixed case - one can always use downcase if needed.

active_threadsafe?

active_threadsafe?() Instance Public methods Adapter should redefine this if it needs a threadsafe way to approximate if the connection is active

active?

active?() Instance Public methods Checks whether the connection to the database is still active. This includes checking whether the database is actually capable of responding, i.e. whether the connection isn't stale.

type_cast_config_to_integer

type_cast_config_to_integer(config) Class Public methods

type_cast_config_to_boolean

type_cast_config_to_boolean(config) Class Public methods

sum

sum(*args) Instance Public methods Calculates the sum of values on a given column. The value is returned with the same data type of the column, 0 if there's no row. See calculate for examples with options. Person.sum(:age) # => 4562

pluck

pluck(*column_names) Instance Public methods Use pluck as a shortcut to select one or more attributes without loading a bunch of records just to grab the attributes you want. Person.pluck(:name) instead of Person.all.map(&:name) Pluck returns an Array of attribute values type-casted to match the plucked column names, if they can be deduced. Plucking an SQL fragment returns String values by default. Person.pluck(:id) # SELECT people.id FROM people # => [1, 2, 3] Person.plu

minimum

minimum(column_name, options = {}) Instance Public methods Calculates the minimum value on a given column. The value is returned with the same data type of the column, or nil if there's no row. See calculate for examples with options. Person.minimum(:age) # => 7