summaryrefslogtreecommitdiff
path: root/bin/mainlite.ml
diff options
context:
space:
mode:
Diffstat (limited to 'bin/mainlite.ml')
-rw-r--r--bin/mainlite.ml26
1 files changed, 13 insertions, 13 deletions
diff --git a/bin/mainlite.ml b/bin/mainlite.ml
index f288891..400f113 100644
--- a/bin/mainlite.ml
+++ b/bin/mainlite.ml
@@ -32,19 +32,19 @@ let () =
Uri.make ~scheme:"sqlite3" ~path:"/home/y/code/ocaml/combattant/bulkdata/blog.db" ()
in
(* Create connection pool with initialization function *)
- (* let connect_pool ~sw ~stdenv uri =
- Caqti_eio_unix.connect_pool
- ~sw
- ~stdenv
- ~post_connect:(fun conn ->
- (* Initialize each connection with SQLite performance pragmas *)
- match Query.init_connection conn with
- | Ok () -> Ok ()
- | Error err -> Error err)
- uri
- in
- match connect_pool ~sw ~stdenv:(env :> Caqti_eio.stdenv) db_uri with *)
- match Caqti_eio_unix.connect_pool ~sw ~stdenv:(env :> Caqti_eio.stdenv) db_uri with
+ let connect_pool ~sw ~stdenv uri =
+ Caqti_eio_unix.connect_pool
+ ~sw
+ ~stdenv
+ ~post_connect:(fun conn ->
+ (* Initialize each connection with SQLite performance pragmas *)
+ match Litedb.Query.init_connection conn with
+ | Ok () -> Ok ()
+ | Error err -> Error err)
+ uri
+ in
+ match connect_pool ~sw ~stdenv:(env :> Caqti_eio.stdenv) db_uri with
+ (* match Caqti_eio_unix.connect_pool ~sw ~stdenv:(env :> Caqti_eio.stdenv) db_uri with *)
| Ok pool ->
let server = Server.create ~config (request_handler ~db_pool:pool) in
ignore @@ Server.Command.start ~sw env server