Sha256: 3f818e1b6a29ba3c4cbd3e91f9200994a2494e1af171008abaec365de5bb462a

Contents?: true

Size: 1.13 KB

Versions: 9

Compression:

Stored size: 1.13 KB

Contents

module Rasti
  module DB
    module NQL
      module FilterConditionStrategies
        module Types
          class Generic

            def self.equal(identifier, value)
              {identifier => value}
            end

            def self.not_equal(identifier, value)
              Sequel.negate equal(identifier, value)
            end

            def self.greater_than(identifier, value)
              identifier > value
            end

            def self.greater_than_or_equal(identifier, value)
              identifier >= value
            end

            def self.less_than(identifier, value)
              identifier < value
            end

            def self.less_than_or_equal(identifier, value)
              identifier <= value
            end

            def self.like(identifier, value)
              Sequel.ilike identifier, value
            end

            def self.include(identifier, value)
              Sequel.ilike identifier, "%#{value}%"
            end

            def self.not_include(identifier, value)
              ~include(identifier, value)
            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/filter_condition_strategies/types/generic.rb
rasti-db-4.1.1 lib/rasti/db/nql/filter_condition_strategies/types/generic.rb
rasti-db-4.1.0 lib/rasti/db/nql/filter_condition_strategies/types/generic.rb
rasti-db-4.0.0 lib/rasti/db/nql/filter_condition_strategies/types/generic.rb
rasti-db-3.0.0 lib/rasti/db/nql/filter_condition_strategies/types/generic.rb
rasti-db-2.3.3 lib/rasti/db/nql/filter_condition_strategies/types/generic.rb
rasti-db-2.3.2 lib/rasti/db/nql/filter_condition_strategies/types/generic.rb
rasti-db-2.3.1 lib/rasti/db/nql/filter_condition_strategies/types/generic.rb
rasti-db-2.3.0 lib/rasti/db/nql/filter_condition_strategies/types/generic.rb