]> matita.cs.unibo.it Git - helm.git/blob - helm/ocaml/mathql_interpreter/pattern.ml
2445e1c760fdae5096914631b5a2f70c2d0a6597
[helm.git] / helm / ocaml / mathql_interpreter / pattern.ml
1
2 open Dbconn;;
3 open Utility;;
4 open Eval;;
5
6 let pattern_ex apreamble apattern ext afragid =
7  let c = pgc () in
8   let r1 = c#exec "select att0 from class where att2='Object'" in
9    let res =
10     c#exec ("select att0 from t" ^ (pgresult_to_string r1) ^
11             " where att0 " ^ (pattern_match apreamble apattern ext afragid))
12    in
13     [["retVal"]] @ List.map (fun l -> [l]) (pgresult_to_string_list res)
14 ;;