Sha256: bad21fa558e3a9f8f2f550681de7828d433c6ce226b23962c3aa4f427d30c083

Contents?: true

Size: 1.49 KB

Versions: 9

Compression:

Stored size: 1.49 KB

Contents

require 'active_record'

%w(active_record column_parser query table conjunctions restrictions restriction_factory filter join order group_by dsl).each do |file|
  require File.join(File.dirname(__FILE__), 'record_filter', file)
end

# The base-level namespace for the record_filter code. See RecordFilter::ActiveRecordExtension::ClassMethods
# for a description of the public API.
module RecordFilter

  # An exception that is raised when an implicit join is attempted on an association 
  # that does not exist.
  class AssociationNotFoundException < StandardError; end
  
  # An exception that is raised when attempting to place restrictions or specify an
  # explicit join on a column that doesn't exist.
  class ColumnNotFoundException < StandardError; end

  # An exception that is raised when operations such as limit, order, group_by, or
  # on are called out of context.
  class InvalidFilterException < StandardError; end

  # An exception that is raised when attempting to create a named filter with a name that
  # already exists in the class it is created on or one of its superclasses.
  class InvalidFilterNameException < StandardError; end

  # An exception that is raised when no columns are privided to specify an explicit join
  # or when the join names are incorrect.
  class InvalidJoinException < StandardError; end

  # An exception raised in the case where a named filter is called from within a filter
  # and the named filter does not exist.
  class NamedFilterNotFoundException < StandardError; end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
aub-record_filter-0.9.12 lib/record_filter.rb
record_filter-1.0.1 lib/record_filter.rb
record_filter-1.0.0 lib/record_filter.rb
record_filter-0.9.17 lib/record_filter.rb
record_filter-0.9.16 lib/record_filter.rb
record_filter-0.9.15 lib/record_filter.rb
record_filter-0.9.14 lib/record_filter.rb
record_filter-0.9.13 lib/record_filter.rb
record_filter-0.9.12 lib/record_filter.rb