Class: Cql::Protocol::Request

Inherits:
Object
  • Object
show all
Includes:
Encoding
Defined in:
lib/cql/protocol/request.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Encoding

#write_bytes, #write_consistency, #write_decimal, #write_double, #write_float, #write_int, #write_long, #write_long_string, #write_short, #write_short_bytes, #write_string, #write_string_list, #write_string_map, #write_uuid, #write_varint

Constructor Details

#initialize(opcode, trace = false) ⇒ Request

Returns a new instance of Request.



10
11
12
13
# File 'lib/cql/protocol/request.rb', line 10

def initialize(opcode, trace=false)
  @opcode = opcode
  @trace = trace
end

Instance Attribute Details

#opcodeObject (readonly)

Returns the value of attribute opcode.



8
9
10
# File 'lib/cql/protocol/request.rb', line 8

def opcode
  @opcode
end

#traceObject (readonly)

Returns the value of attribute trace.



8
9
10
# File 'lib/cql/protocol/request.rb', line 8

def trace
  @trace
end

Instance Method Details

#compressable?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/cql/protocol/request.rb', line 19

def compressable?
  true
end

#trace?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/cql/protocol/request.rb', line 15

def trace?
  @trace
end