Class: CypherBuilder::Where

Inherits:
Object
  • Object
show all
Includes:
Resolver
Defined in:
lib/cypher_builder/where.rb

Instance Method Summary collapse

Methods included from Resolver

#resolve, #wrap

Constructor Details

#initialize(*parts) ⇒ Where

Returns a new instance of Where.



9
10
11
# File 'lib/cypher_builder/where.rb', line 9

def initialize(*parts)
  @parts = wrap(*parts)
end

Instance Method Details

#as_cypher(payload:, context:) ⇒ Object



13
14
15
# File 'lib/cypher_builder/where.rb', line 13

def as_cypher(payload:, context: )
  resolve(@parts, format: 'WHERE %s', separator: ' AND ', payload: payload, context: context.add(self))
end