From 993def62525a6b67572f6edc5c9ce7a787f36554 Mon Sep 17 00:00:00 2001 From: Brendan Long Date: Thu, 6 May 2021 13:15:03 -0600 Subject: [PATCH] Support passing ssl_config through --- pgx/src/pgx.mli | 3 ++- pgx_async/src/pgx_async.mli | 18 ++++-------------- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/pgx/src/pgx.mli b/pgx/src/pgx.mli index 526f400..cbf5ec6 100644 --- a/pgx/src/pgx.mli +++ b/pgx/src/pgx.mli @@ -49,4 +49,5 @@ module Value = Pgx_value module type S = Pgx_intf.S -module Make (Thread : Io) : S with type 'a Io.t = 'a Thread.t +module Make (Thread : Io) : + S with type 'a Io.t = 'a Thread.t and type Io.ssl_config = Thread.ssl_config diff --git a/pgx_async/src/pgx_async.mli b/pgx_async/src/pgx_async.mli index 43b7ac5..f816033 100644 --- a/pgx_async/src/pgx_async.mli +++ b/pgx_async/src/pgx_async.mli @@ -1,24 +1,14 @@ (** Async based Postgres client based on Pgx. *) open Async_kernel -include Pgx.S with type 'a Io.t = 'a Deferred.t +include + Pgx.S + with type 'a Io.t = 'a Deferred.t + and type Io.ssl_config = Conduit_async.Ssl.config (* for testing purposes *) module Thread : Pgx.Io with type 'a t = 'a Deferred.t -val with_conn - : ?ssl:[ `Auto | `No | `Always of Io.ssl_config ] - -> ?host:string - -> ?port:int - -> ?user:string - -> ?password:string - -> ?database:string - -> ?unix_domain_socket_dir:string - -> ?verbose:int - -> ?max_message_length:int - -> (t -> 'a Deferred.t) - -> 'a Deferred.t - (** Like [execute] but returns a pipe so you can operate on the results before they have all returned. Note that [execute_iter] and [execute_fold] can perform significantly better because they don't have as much overhead. *)