Source

hello / sql / main.ml

Full commit

let parse q =
  let lexbuf = Lexing.from_string q in
  try
    Sql_parser.input Sql_lexer.token lexbuf
  with
    | exn ->
      print_endline (Printexc.to_string exn);
      raise exn;;

let sample_query = "select * from mytable";;

let _ =
  print_endline sample_query;
(*  Sql.pp_query (Sql.Select(Sql.Columns(["hoge"; "hage"]), "tttttttttttttt")); *)
  let q = parse sample_query in
  Sql.pp_query q;
  print_endline " => hello";;