Method: CypherBuilder::Rel#as_cypher
- Defined in:
- lib/cypher_builder/rel.rb
#as_cypher(payload:, context:) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/cypher_builder/rel.rb', line 12 def as_cypher(payload:, context:) ::Kernel.sprintf('%s-[%s]->%s', (@from ? @from.as_cypher(payload: payload, context: context.add(self)) : '()'), [@prefix, *@labels].compact.join(':'), (@to ? @to.as_cypher(payload: payload, context: context.add(self)) : '()')) end |