Sha256: aab53f47ff18907ee032165dd2b78cd3d086150792121b3df3a6491941968f4a

Contents?: true

Size: 770 Bytes

Versions: 9

Compression:

Stored size: 770 Bytes

Contents

module Rasti
  module DB
    module NQL
      module Nodes
        module Comparisons
          class Base < Treetop::Runtime::SyntaxNode

            def dependency_tables
              attribute.tables.empty? ? [] : [attribute.tables.join('.')]
            end

            def computed_attributes(collection_class)
              attribute.computed_attributes(collection_class)
            end

            def filter_condition(collection_class)
              DB.nql_filter_condition_for comparison_name, attribute.identifier(collection_class), argument
            end

            private

            def comparison_name
              Inflecto.underscore(Inflecto.demodulize(self.class)).to_sym
            end

          end
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rasti-db-4.2.0 lib/rasti/db/nql/nodes/comparisons/base.rb
rasti-db-4.1.1 lib/rasti/db/nql/nodes/comparisons/base.rb
rasti-db-4.1.0 lib/rasti/db/nql/nodes/comparisons/base.rb
rasti-db-4.0.0 lib/rasti/db/nql/nodes/comparisons/base.rb
rasti-db-3.0.0 lib/rasti/db/nql/nodes/comparisons/base.rb
rasti-db-2.3.3 lib/rasti/db/nql/nodes/comparisons/base.rb
rasti-db-2.3.2 lib/rasti/db/nql/nodes/comparisons/base.rb
rasti-db-2.3.1 lib/rasti/db/nql/nodes/comparisons/base.rb
rasti-db-2.3.0 lib/rasti/db/nql/nodes/comparisons/base.rb