Class: ActiveCypher::Bolt::Messaging::Discard

Inherits:
Message
  • Object
show all
Defined in:
lib/active_cypher/bolt/messaging.rb

Overview

The DISCARD message. For when you want to throw away results, or your hopes.

Constant Summary collapse

SIGNATURE =
0x2F

Instance Attribute Summary

Attributes inherited from Message

#fields, #signature

Instance Method Summary collapse

Methods inherited from Message

#==, inherited

Constructor Details

#initialize(metadata) ⇒ Discard

metadata: { n: <N>, qid: <QID> }, where n = -1 means all



173
174
175
176
# File 'lib/active_cypher/bolt/messaging.rb', line 173

def initialize()
  meta = Messaging.normalize_map()
  super(SIGNATURE, [meta])
end

Instance Method Details

#metadataObject



178
# File 'lib/active_cypher/bolt/messaging.rb', line 178

def  = fields.first

#nObject



179
# File 'lib/active_cypher/bolt/messaging.rb', line 179

def n        = [:n] || ['n']

#qidObject



180
# File 'lib/active_cypher/bolt/messaging.rb', line 180

def qid      = [:qid] || ['qid']