module Rasti::DB

Constants

VERSION

Public Class Methods

from_db(value) click to toggle source
# File lib/rasti/db.rb, line 36
def self.from_db(value)
  type_converters.inject(value) do |result, type_converter|
    type_converter.from_db result
  end
end
nql_filter_condition_for(comparison_name, identifier, argument) click to toggle source
# File lib/rasti/db.rb, line 42
def self.nql_filter_condition_for(comparison_name, identifier, argument)
  raise 'Undefined Rasti::DB.nql_filter_condition_strategy' unless nql_filter_condition_strategy
  nql_filter_condition_strategy.filter_condition_for comparison_name, identifier, argument
end
to_db(db, collection_name, attribute_name, value) click to toggle source
# File lib/rasti/db.rb, line 30
def self.to_db(db, collection_name, attribute_name, value)
  type_converters.inject(value) do |result, type_converter|
    type_converter.to_db db, collection_name, attribute_name, result
  end
end