Class: Cassandra::Statements::Bound

Inherits:
Object
  • Object
show all
Includes:
Cassandra::Statement
Defined in:
lib/cassandra/statements/bound.rb

Overview

a Bound statement is created using Prepared#bind

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#cqlString (readonly)

Returns original cql used to prepare this statement.

Returns:

  • (String)

    original cql used to prepare this statement



26
27
28
# File 'lib/cassandra/statements/bound.rb', line 26

def cql
  @cql
end

#paramsArray<Object> (readonly)

Returns a list of positional parameters for the cql.

Returns:

  • (Array<Object>)

    a list of positional parameters for the cql



28
29
30
# File 'lib/cassandra/statements/bound.rb', line 28

def params
  @params
end

Instance Method Details

#inspectString

Returns a CLI-friendly bound statement representation.

Returns:

  • (String)

    a CLI-friendly bound statement representation



43
44
45
# File 'lib/cassandra/statements/bound.rb', line 43

def inspect
  "#<#{self.class.name}:0x#{self.object_id.to_s(16)} @cql=#{@cql.inspect} @params=#{@params}>"
end