Class: Neo4j::Core::Cypher::NodeQuery

Inherits:
Start show all
Defined in:
lib/neo4j-core/cypher/cypher.rb

Instance Attribute Summary collapse

Attributes inherited from Start

#var_name

Attributes included from Variable

#return_method

Attributes inherited from Expression

#clause, #expressions, #separator

Instance Method Summary collapse

Methods included from Matchable

#-, #<, #<<, #<=>, #>, #>>, #both, #incoming, #outgoing

Methods included from Variable

#[], #as, #distinct, #exist?, #is_a?, #neo_id, #property?

Methods inherited from Expression

#insert_last, #prefix, #prefixes, #valid?

Constructor Details

#initialize(index_class, query, index_type, expressions) ⇒ NodeQuery

Returns a new instance of NodeQuery.



344
345
346
347
348
# File 'lib/neo4j-core/cypher/cypher.rb', line 344

def initialize(index_class, query, index_type, expressions)
  super("n", expressions)
  @index_name = index_class.index_name_for_type(index_type)
  @query = query
end

Instance Attribute Details

#index_nameObject (readonly)

Returns the value of attribute index_name.



342
343
344
# File 'lib/neo4j-core/cypher/cypher.rb', line 342

def index_name
  @index_name
end

#queryObject (readonly)

Returns the value of attribute query.



342
343
344
# File 'lib/neo4j-core/cypher/cypher.rb', line 342

def query
  @query
end

Instance Method Details

#to_sObject



350
351
352
# File 'lib/neo4j-core/cypher/cypher.rb', line 350

def to_s
  "#{var_name}=node:#{index_name}(#{query})"
end