class CypherBuilder::Runner
Attributes
cypher[RW]
@return [Cypher]
Public Class Methods
exec(adapter = Adapter::DEFAULT, ** params)
click to toggle source
# File lib/cypher_builder/infra/runner.rb, line 7 def exec(adapter = Adapter::DEFAULT, ** params) self.new(adapter).execute(** params) end
new(adapter = Adapter::DEFAULT)
click to toggle source
@param adapter [Adapter]
# File lib/cypher_builder/infra/runner.rb, line 13 def initialize(adapter = Adapter::DEFAULT) @adapter = adapter end
Public Instance Methods
execute(** params)
click to toggle source
# File lib/cypher_builder/infra/runner.rb, line 17 def execute(** params) payload = Payload.new(params) context = Context.new cypher = self.class.cypher.as_cypher(payload: payload, context: context) @adapter.execute(cypher, payload.necessary) end