Class: Cassandra::Execution::Options

Inherits:
Object
  • Object
show all
Defined in:
lib/cassandra/execution/options.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#argumentsArray (readonly)

Returns positional arguments for the statement.

Returns:

  • (Array)

    positional arguments for the statement



34
35
36
# File 'lib/cassandra/execution/options.rb', line 34

def arguments
  @arguments
end

#consistencySymbol (readonly)

Returns consistency for request. Must be one of CONSISTENCIES.

Returns:

  • (Symbol)

    consistency for request. Must be one of CONSISTENCIES



24
25
26
# File 'lib/cassandra/execution/options.rb', line 24

def consistency
  @consistency
end

#page_sizeInteger (readonly)

Returns requested page size.

Returns:

  • (Integer)

    requested page size



30
31
32
# File 'lib/cassandra/execution/options.rb', line 30

def page_size
  @page_size
end

#paging_stateString (readonly)

Note:

Although this feature exists to allow web applications to store paging state in an HTTP cookie, it is not safe to expose without encrypting or otherwise securing it. Paging state contains information internal to the Apache Cassandra cluster, such as partition key and data. Additionally, if a paging state is sent with CQL statement, different from the original, the behavior of Cassandra is undefined and will likely cause a server process of the coordinator of such request to abort.

Returns paging state.

Returns:

  • (String)

    paging state

See Also:



48
49
50
# File 'lib/cassandra/execution/options.rb', line 48

def paging_state
  @paging_state
end

#serial_consistencySymbol (readonly)

Returns consistency for request with conditional updates (lightweight - compare-and-set, CAS - transactions). Must be one of SERIAL_CONSISTENCIES.

Returns:

  • (Symbol)

    consistency for request with conditional updates (lightweight - compare-and-set, CAS - transactions). Must be one of SERIAL_CONSISTENCIES



28
29
30
# File 'lib/cassandra/execution/options.rb', line 28

def serial_consistency
  @serial_consistency
end

#timeoutNumeric (readonly)

Returns request timeout interval.

Returns:

  • (Numeric)

    request timeout interval



32
33
34
# File 'lib/cassandra/execution/options.rb', line 32

def timeout
  @timeout
end

Instance Method Details

#eql?(other) ⇒ Boolean Also known as: ==

Returns:

  • (Boolean)


102
103
104
105
106
107
108
109
110
111
# File 'lib/cassandra/execution/options.rb', line 102

def eql?(other)
  other.is_a?(Options) &&
    other.consistency == @consistency &&
    other.page_size == @page_size &&
    other.trace? == @trace &&
    other.timeout == @timeout &&
    other.serial_consistency == @serial_consistency &&
    other.paging_state == @paging_state &&
    other.arguments == @arguments
end

#trace?Boolean

Returns whether request tracing was enabled.

Returns:

  • (Boolean)

    whether request tracing was enabled



98
99
100
# File 'lib/cassandra/execution/options.rb', line 98

def trace?
  @trace
end