Obj_container_file.Encode
Encoding multiple rows to an output
type 'a with_params = ?max_block_count:int -> ?buf_size:int -> ?pool:Avro__Iobuf.Pool.t -> ?codec:Codec.t -> 'a
val make : (Output.t -> schema:string -> write:(Output.t -> 'a -> unit) -> 'a t) with_params
make a new encoder.
val push : 'a t -> 'a -> unit
push enc x
pushes a row into enc
.
val cur_block_count : _ t -> int
How many objects in the current block?
val flush_block : _ t -> unit
Flush current block to output
val close : _ t -> unit
close enc
flushes the last block, if any, and renders the encoder unusable.
val write_seq : (schema:string -> write:(Output.t -> 'a -> unit) -> Output.t -> 'a Stdlib.Seq.t -> unit) with_params
Encode the given sequence of rows into the output.
val write_seq_to_string : (schema:string -> write:(Output.t -> 'a -> unit) ->
'a Stdlib.Seq.t -> string) with_params
Encode the given sequence of rows into a string