Class: NoSE::Disconnect

Inherits:
Connection show all
Defined in:
lib/nose/statements/connection.rb

Overview

A representation of a disconnect in the workload

Instance Attribute Summary

Attributes inherited from Connection

#conditions, #source_pk, #target, #target_pk

Attributes inherited from Statement

#comment, #entity, #eq_fields, #graph, #group, #key_path, #label, #range_field, #text

Instance Method Summary collapse

Methods inherited from Connection

#==, #hash, #initialize, keys_from_tree, #modifies_index?, parse, #support_queries

Methods included from StatementSupportQuery

#modifies_index?, #support_queries

Methods inherited from Statement

#initialize, #materialize_view, parse, #read_only?, #requires_insert?, #to_color

Constructor Details

This class inherits a constructor from NoSE::Connection

Instance Method Details

#requires_delete?(_index) ⇒ Boolean

Specifies that disconnections require deletion

Returns:

  • (Boolean)


156
157
158
# File 'lib/nose/statements/connection.rb', line 156

def requires_delete?(_index)
  true
end

#unparseString

Produce the SQL text corresponding to this disconnection

Returns:

  • (String)


150
151
152
153
# File 'lib/nose/statements/connection.rb', line 150

def unparse
  "DISCONNECT #{source.name}(\"#{source_pk}\") FROM " \
    "#{target.name}(\"#{target_pk}\")"
end