Class: Cequel::Metal::CqlRowSpecification Private

Inherits:
Object
  • Object
show all
Defined in:
lib/cequel/metal/cql_row_specification.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Encapsulates a row specification (‘WHERE` clause) specified by a CQL string

Since:

  • 1.0.0

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(condition, bind_vars) ⇒ CqlRowSpecification

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Create a new row specification

Parameters:

  • condition (String)

    CQL string representing condition

  • bind_vars (Array)

    Bind variables

Since:

  • 1.0.0



27
28
29
# File 'lib/cequel/metal/cql_row_specification.rb', line 27

def initialize(condition, bind_vars)
  @condition, @bind_vars = condition, bind_vars
end

Class Method Details

.build(condition, bind_vars) ⇒ Array<CqlRowSpecification>

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Build a new row specification

Parameters:

  • condition (String)

    CQL string representing condition

  • bind_vars (Array)

    Bind variables

Returns:

Since:

  • 1.0.0



17
18
19
# File 'lib/cequel/metal/cql_row_specification.rb', line 17

def self.build(condition, bind_vars)
  [new(condition, bind_vars)]
end

Instance Method Details

#cqlArray

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

CQL and bind variables for this condition

Returns:

  • (Array)

    CQL string followed by zero or more bind variables

Since:

  • 1.0.0



35
36
37
# File 'lib/cequel/metal/cql_row_specification.rb', line 35

def cql
  [@condition, *@bind_vars]
end