module Neo4j::Cypher::Context::Matchable
Public Instance Methods
-(other)
click to toggle source
This operator means any direction related to @param (see #>) @return [MatchRelLeft, MatchNode]
# File lib/neo4j-cypher/context.rb 380 def -(other) 381 MatchStart.new(clause).new_match_rel(other).eval_context 382 end
<(other)
click to toggle source
This operator means incoming related to @param (see #>) @return [MatchRelLeft, MatchNode]
# File lib/neo4j-cypher/context.rb 387 def <(other) 388 MatchStart.new(clause).new_match_rel(other).eval_context 389 end
<<(other)
click to toggle source
Incoming relationship to other node @param [Symbol, var_name] other either a node (Symbol, var_name) @return [MatchRelLeft, MatchNode]
# File lib/neo4j-cypher/context.rb 401 def <<(other) 402 MatchStart.new_match_node(clause, other, :incoming).eval_context 403 end
<=>(other)
click to toggle source
This operator means related to, without regard to type or direction. @param [Symbol, var_name] other either a node (Symbol, var_name) @return [MatchRelLeft, MatchNode]
# File lib/neo4j-cypher/context.rb 366 def <=>(other) 367 MatchStart.new_match_node(clause, other, :both).eval_context 368 end
==(other)
click to toggle source
# File lib/neo4j-cypher/context.rb 332 def ==(other) 333 Operator.new(clause_list, clause, other, "=").eval_context 334 end
>(other)
click to toggle source
This operator means outgoing related to @param [Symbol, var_name, String] other the relationship @return [MatchRelLeft, MatchNode]
# File lib/neo4j-cypher/context.rb 373 def >(other) 374 MatchStart.new(clause).new_match_rel(other).eval_context 375 end
>>(other)
click to toggle source
Outgoing relationship to other node @param [Symbol, var_name] other either a node (Symbol, var_name) @return [MatchRelLeft, MatchNode]
# File lib/neo4j-cypher/context.rb 394 def >>(other) 395 MatchStart.new_match_node(clause, other, :outgoing).eval_context 396 end
_get_or_create_node(rel_types)
click to toggle source
# File lib/neo4j-cypher/context.rb 411 def _get_or_create_node(rel_types) 412 rel_types.last.kind_of?(Matchable) ? rel_types.pop.clause : NodeVar.new(clause.clause_list) 413 end
both(*rel_types)
click to toggle source
# File lib/neo4j-cypher/context.rb 433 def both(*rel_types) 434 node = _get_or_create_node(rel_types) 435 MatchStart.new(clause).new_match_rels(rel_types).eval_context - node 436 node.eval_context 437 end
both?(*rel_types)
click to toggle source
# File lib/neo4j-cypher/context.rb 439 def both?(*rel_types) 440 node = _get_or_create_node(rel_types) 441 MatchStart.new(clause).new_match_rels?(rel_types).eval_context - node 442 node.eval_context 443 end
create_path(*args, &cypher_dsl)
click to toggle source
# File lib/neo4j-cypher/context.rb 352 def create_path(*args, &cypher_dsl) 353 CreatePath.new(clause_list, self, *args, &cypher_dsl) 354 self 355 end
create_unique_path(*args, &cypher_dsl)
click to toggle source
# File lib/neo4j-cypher/context.rb 357 def create_unique_path(*args, &cypher_dsl) 358 CreatePath.new(clause_list, self, *args, &cypher_dsl).unique! 359 self 360 end
incoming(*rel_types)
click to toggle source
# File lib/neo4j-cypher/context.rb 421 def incoming(*rel_types) 422 node = _get_or_create_node(rel_types) 423 MatchStart.new(clause).new_match_rels(rel_types).eval_context < node 424 node.eval_context 425 end
incoming?(*rel_types)
click to toggle source
# File lib/neo4j-cypher/context.rb 427 def incoming?(*rel_types) 428 node = _get_or_create_node(rel_types) 429 MatchStart.new(clause).new_match_rels?(rel_types).eval_context < node 430 node.eval_context 431 end
match(&cypher_dsl)
click to toggle source
# File lib/neo4j-cypher/context.rb 337 def match(&cypher_dsl) 338 RootClause::EvalContext.new(self).instance_exec(self, &cypher_dsl) 339 self 340 end
outgoing(*rel_types)
click to toggle source
# File lib/neo4j-cypher/context.rb 405 def outgoing(*rel_types) 406 node = _get_or_create_node(rel_types) 407 MatchStart.new(clause).new_match_rels(rel_types).eval_context > node 408 node.eval_context 409 end
outgoing?(*rel_types)
click to toggle source
# File lib/neo4j-cypher/context.rb 415 def outgoing?(*rel_types) 416 node = _get_or_create_node(rel_types) 417 MatchStart.new(clause).new_match_rels?(rel_types).eval_context > node 418 node.eval_context 419 end
with(*args, &cypher_dsl)
click to toggle source
# File lib/neo4j-cypher/context.rb 342 def with(*args, &cypher_dsl) 343 With.new(clause_list, :where, self, *args, &cypher_dsl) 344 self 345 end
with_match(*args, &cypher_dsl)
click to toggle source
# File lib/neo4j-cypher/context.rb 347 def with_match(*args, &cypher_dsl) 348 With.new(clause_list, :match, self, *args, &cypher_dsl) 349 self 350 end