Source

hello / sql / sql.ml

Full commit
1
2
3
4
5
6
7
8
9

type columns = All_col | Columns of string list
type query = Select of columns * string (* columns, table *)

let pp_query = function
  | Select(All_col, table) ->
    Printf.printf "select: * from %s\n" table;
  | Select(Columns(columns), table) ->
    Printf.printf "select: %s from %s\n" (String.concat "," columns) table;;