Neodriver_eio.Neo4jResultA lazily-streamed query result (next/peek/fetch/consume/single).
A lazily-streamed query result. next/peek/fetch iterate the records (pulling from the connection on demand); consume drains the stream and returns its summary; single/single_optional enforce cardinality.
A deferred server failure is surfaced as Error once the buffered records before it have been consumed.
val make :
?fetch_size:int ->
?query:string ->
?parameters:(string * Neodriver_core.Values.t) list ->
Conn.stream ->
tWrap a stream (as produced by Session.run or Tx.run) into a t. fetch_size is the number of records pulled per PULL when the buffer runs out (default 1000).
val stream : t -> Conn.streamThe underlying stream (for the summary, buffered records and raw pull).
val keys : t -> string listThe field names of the returned records.
val next :
t ->
(Neodriver_core.Values.t list option, Neodriver_core.Errors.t) Stdlib.resultThe next record, or None once the stream is exhausted.
val peek :
t ->
(Neodriver_core.Values.t list option, Neodriver_core.Errors.t) Stdlib.resultThe next record without advancing past it.
val fetch :
?n:int ->
t ->
(Neodriver_core.Values.t list list, Neodriver_core.Errors.t) Stdlib.resultUp to n records (all remaining when n is omitted).
val values :
t ->
(Neodriver_core.Values.t list list, Neodriver_core.Errors.t) Stdlib.resultAll remaining records.
val data :
t ->
((string * Neodriver_core.Values.t) list list, Neodriver_core.Errors.t)
Stdlib.resultAll remaining records, each paired with its field names.
val consume : t -> (Summary.t, Neodriver_core.Errors.t) Stdlib.resultDrain the stream and return its summary.
val single :
t ->
(Neodriver_core.Values.t list, Neodriver_core.Errors.t) Stdlib.resultThe single remaining record; an error unless exactly one.
val single_optional :
t ->
(Neodriver_core.Values.t list option, Neodriver_core.Errors.t) Stdlib.resultThe single remaining record, or None; an error if more than one.