Sha256: 040fdf5b9b98cef29e0efe2aeda9cf8a17be0647fc9fd867348f017d63a62681

Contents?: true

Size: 694 Bytes

Versions: 4

Compression:

Stored size: 694 Bytes

Contents

# encoding: utf-8

module QueryBuilder::CQL

  module Modifiers

    # Provides COUNTER batch type
    #
    module Counter

      # Adds a clause to the statement
      #
      # @return [QueryBuilder::Core::Statement] updated statement
      #
      def counter
        self << Clause.new
      end

      private

      def maybe_type
        clauses(:type)
      end

      # The clause for adding to a statement
      #
      # @api private
      #
      class Clause < Base

        unique
        type :type

        # @private
        def to_s
          "COUNTER"
        end

      end # class Clause

    end # module Counter

  end # module Modifiers

end # module QueryBuilder::CQL

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
query_builder-0.0.4 lib/query_builder/cql/modifiers/counter.rb
query_builder-0.0.3 lib/query_builder/cql/modifiers/counter.rb
query_builder-0.0.2 lib/query_builder/cql/modifiers/counter.rb
query_builder-0.0.1 lib/query_builder/cql/modifiers/counter.rb