package olinq

  1. Overview
  2. Docs
val read_chan : in_channel -> (string, [> `One ]) t

Read the content of the whole channel in (blocking), returning the corresponding string. The channel will be read at most once during execution, and its content cached; however the channel might never get read because evaluation is lazy.

val read_file : string -> (string, [> `One ]) t

Read a whole file (given by name) and return its content as a string

val lines : (string, _) t -> (string, [ `Any ]) t

Convert a string into a collection of lines

val lines_l : (string, 'card) t -> (string list, 'card) t

Convert each string into a list of lines

val concat : string -> (string, _) t -> (string, [> `One ]) t

concat sep q joins all the strings in q together, similar to String.concat sep (run_list q) basically.

val unlines : (string, _) t -> (string, [> `One ]) t

Join lines together

val out : out_channel -> (string, _) t -> unit
val out_lines : out_channel -> (string, _) t -> unit

Evaluate the query and print it line by line on the output

Run methods
val to_file : string -> (string, _) t -> unit or_error
val to_file_exn : string -> (string, _) t -> unit
val to_file_lines : string -> (string, _) t -> unit or_error
val to_file_lines_exn : string -> (string, _) t -> unit