Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
38 lines (31 sloc) 1.19 KB
(* DO NOT EDIT MANUALLY *)
(* *)
(* generated by sqlgg 0.2.3-49-g30df037 on 2010-01-14T17:45Z *)
module Make (T : Sqlgg_traits.M) = struct
let create_muc db =
T.execute db "CREATE TABLE IF NOT EXISTS muc (room text, nick text, lang text, chatlog char(1))" T.no_params
let select_rooms db callback =
let invoke_callback stmt =
callback
(T.get_column_Text stmt 0)
(T.get_column_Text stmt 1)
(T.get_column_Text stmt 2)
(T.get_column_Text stmt 3)
in
T.select db "SELECT room, nick, lang, chatlog FROM muc" T.no_params invoke_callback
module Fold = struct
let create_muc db =
T.execute db "CREATE TABLE IF NOT EXISTS muc (room text, nick text, lang text, chatlog char(1))" T.no_params
let select_rooms db callback acc =
let invoke_callback stmt =
callback
(T.get_column_Text stmt 0)
(T.get_column_Text stmt 1)
(T.get_column_Text stmt 2)
(T.get_column_Text stmt 3)
in
let r_acc = ref acc in
T.select db "SELECT room, nick, lang, chatlog FROM muc" T.no_params (fun x -> r_acc := invoke_callback x !r_acc);
!r_acc
end (* module Fold *)
end (* module Make *)
Something went wrong with that request. Please try again.