Sha256: 2c42edbb9cc9a7581f1ef4cb34ad7fd69f71777e035d6b177d536f2cd139514d
Contents?: true
Size: 815 Bytes
Versions: 9
Compression:
Stored size: 815 Bytes
Contents
module Neo4j module Core class QueryBuilder attr_reader :queries Query = Struct.new(:cypher, :parameters, :pretty_cypher, :context) def initialize @queries = [] end def append(*args) query = case args.map(&:class) when [String], [String, Hash] Query.new(args[0], args[1] || {}) when [::Neo4j::Core::Query] args[0] else fail ArgumentError, "Could not determine query from arguments: #{args.inspect}" end @queries << query end def query # `nil` sessions are just a workaround until # we phase out `Query` objects containing sessions Neo4j::Core::Query.new(session: nil) end end end end
Version data entries
9 entries across 9 versions & 2 rubygems