Specifications:
Options should allow nil timeout to override base non-nil timeout option
result = Options.new({timeout: nil}, base_options)
expect(result.timeout).to be_nil
Options should non-nil timeout to override base non-nil timeout option
result = Options.new({timeout: 123}, base_options)
expect(result.timeout).to eq(123)
Options should not override base timeout if not specified
result = Options.new({}, base_options)
expect(result.timeout).to eq(10)
Options should override with execution-profile and simple attribute
profile = Profile.new(load_balancing_policy: lbp2, retry_policy: retry_policy, timeout: 21, consistency: :quorum)
result = base_options.override(profile, timeout: 42)
expect(result.load_balancing_policy).to be(lbp2)
expect(result.retry_policy).to be(retry_policy)
expect(result.consistency).to be(:quorum)
expect(result.timeout).to eq(42)

Inherits

Object

Methods

consistency

Returns consistency for request. Must be one of CONSISTENCIES

Returns:
Type Details
Symbol consistency for request. Must be one of CONSISTENCIES

serial_consistency

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

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

page_size

Returns requested page size

Returns:
Type Details
Integer requested page size

timeout

Returns request timeout interval

Returns:
Type Details
Numeric request timeout interval

arguments

Returns positional arguments for the statement

Returns:
Type Details
Array positional arguments for the statement

type_hints

Returns type hints for positional arguments for the statement

Returns:
Type Details
Array type hints for positional arguments for the statement

paging_state

Returns paging state

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:
Type Details
String paging state
See Also:

payload

Returns custom outgoing payload, a map of string and byte buffers.

Examples:
Sending a custom payload
result = session.execute(payload: {
           'some key' => Cassandra::Protocol::CqlByteBuffer.new
                                                           .append_string('some value')
         })
Returns:
Type Details
(nil or Hash<String, String>) custom outgoing payload, a map of string and byte buffers.
See Also:

load_balancing_policy

Returns load-balancing policy that determines which node will run the next statement.

Returns:
Type Details
LoadBalancing::Policy load-balancing policy that determines which node will run the next statement.

retry_policy

Returns retry policy that determines how request retries should be handled for different failure modes.

Returns:
Type Details
Retry::Policy retry policy that determines how request retries should be handled for different failure modes.

trace?

Returns whether request tracing was enabled

Returns:
Type Details
Boolean whether request tracing was enabled

idempotent?

Returns whether statement can be retried on timeout

Returns:
Type Details
Boolean whether statement can be retried on timeout