Class: Gqldb::GqlRequest
- Inherits:
-
Object
- Object
- Gqldb::GqlRequest
- Defined in:
- lib/tina4_ultipa/pb.rb
Instance Attribute Summary collapse
-
#gql ⇒ Object
Returns the value of attribute gql.
-
#graph_name ⇒ Object
Returns the value of attribute graph_name.
-
#max_path_results ⇒ Object
Returns the value of attribute max_path_results.
-
#parameters ⇒ Object
Returns the value of attribute parameters.
-
#read_only ⇒ Object
Returns the value of attribute read_only.
-
#session_id ⇒ Object
Returns the value of attribute session_id.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
-
#transaction_id ⇒ Object
Returns the value of attribute transaction_id.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(gql: "", graph_name: "", parameters: [], session_id: 0, transaction_id: 0, timeout: 0, read_only: false, max_path_results: 0) ⇒ GqlRequest
constructor
A new instance of GqlRequest.
Constructor Details
#initialize(gql: "", graph_name: "", parameters: [], session_id: 0, transaction_id: 0, timeout: 0, read_only: false, max_path_results: 0) ⇒ GqlRequest
Returns a new instance of GqlRequest.
353 354 355 356 357 358 359 360 361 362 363 364 |
# File 'lib/tina4_ultipa/pb.rb', line 353 def initialize(gql: "", graph_name: "", parameters: [], session_id: 0, transaction_id: 0, timeout: 0, read_only: false, max_path_results: 0) @gql = gql @graph_name = graph_name @parameters = parameters @session_id = session_id @transaction_id = transaction_id @timeout = timeout @read_only = read_only @max_path_results = max_path_results end |
Instance Attribute Details
#gql ⇒ Object
Returns the value of attribute gql.
350 351 352 |
# File 'lib/tina4_ultipa/pb.rb', line 350 def gql @gql end |
#graph_name ⇒ Object
Returns the value of attribute graph_name.
350 351 352 |
# File 'lib/tina4_ultipa/pb.rb', line 350 def graph_name @graph_name end |
#max_path_results ⇒ Object
Returns the value of attribute max_path_results.
350 351 352 |
# File 'lib/tina4_ultipa/pb.rb', line 350 def max_path_results @max_path_results end |
#parameters ⇒ Object
Returns the value of attribute parameters.
350 351 352 |
# File 'lib/tina4_ultipa/pb.rb', line 350 def parameters @parameters end |
#read_only ⇒ Object
Returns the value of attribute read_only.
350 351 352 |
# File 'lib/tina4_ultipa/pb.rb', line 350 def read_only @read_only end |
#session_id ⇒ Object
Returns the value of attribute session_id.
350 351 352 |
# File 'lib/tina4_ultipa/pb.rb', line 350 def session_id @session_id end |
#timeout ⇒ Object
Returns the value of attribute timeout.
350 351 352 |
# File 'lib/tina4_ultipa/pb.rb', line 350 def timeout @timeout end |
#transaction_id ⇒ Object
Returns the value of attribute transaction_id.
350 351 352 |
# File 'lib/tina4_ultipa/pb.rb', line 350 def transaction_id @transaction_id end |
Class Method Details
.encode(msg) ⇒ Object
366 367 368 369 370 371 372 373 374 375 376 377 378 379 |
# File 'lib/tina4_ultipa/pb.rb', line 366 def self.encode(msg) buf = "".b Wire.write_string(buf, 1, msg.gql) Wire.write_string(buf, 2, msg.graph_name) msg.parameters.each do |p| Wire.write_bytes(buf, 3, Parameter.encode(p)) end Wire.write_varint(buf, 4, msg.session_id) Wire.write_varint(buf, 5, msg.transaction_id) Wire.write_varint(buf, 6, msg.timeout) Wire.write_bool(buf, 7, msg.read_only) Wire.write_varint(buf, 8, msg.max_path_results) buf end |