Sha256: 33a155329f3bd98686a75821cb3970adb56fd5b534004139d1da69aea0eea39c

Contents?: true

Size: 806 Bytes

Versions: 12

Compression:

Stored size: 806 Bytes

Contents

module AgnosticBackend
  module Queryable
    module Operations
      class Unary < Operation
        attr_reader :operand

        def initialize(operand:, context: nil)
          @operand = operand
          super([operand], context)
        end
      end

      class Not < Unary
        def initialize(operand:, context:)
          super(operand: operand, context: context)
        end
      end

      class OrderQualifier < Unary
        def initialize(attribute:, context: nil)
          attribute = attribute_component(attribute: attribute, context: context)
          super(operand: attribute, context: context)
        end

        alias_method :attribute, :operand
      end

      class Ascending < OrderQualifier;
      end

      class Descending < OrderQualifier;
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
agnostic_backend-1.0.4 lib/agnostic_backend/queryable/operations/unary.rb
agnostic_backend-1.0.3 lib/agnostic_backend/queryable/operations/unary.rb
agnostic_backend-1.0.2 lib/agnostic_backend/queryable/operations/unary.rb
agnostic_backend-1.0.1 lib/agnostic_backend/queryable/operations/unary.rb
agnostic_backend-1.0.0 lib/agnostic_backend/queryable/operations/unary.rb
agnostic_backend-0.9.9 lib/agnostic_backend/queryable/operations/unary.rb
agnostic_backend-0.9.8 lib/agnostic_backend/queryable/operations/unary.rb
agnostic_backend-0.9.4 lib/agnostic_backend/queryable/operations/unary.rb
agnostic_backend-0.9.3 lib/agnostic_backend/queryable/operations/unary.rb
agnostic_backend-0.9.2 lib/agnostic_backend/queryable/operations/unary.rb
agnostic_backend-0.9.1 lib/agnostic_backend/queryable/operations/unary.rb
agnostic_backend-0.9.0 lib/agnostic_backend/queryable/operations/unary.rb