Skip to content

Commit

Permalink
Support passing ssl_config through
Browse files Browse the repository at this point in the history
  • Loading branch information
brendanlong committed May 6, 2021
1 parent d4f426a commit 993def6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 deletions.
3 changes: 2 additions & 1 deletion pgx/src/pgx.mli
Original file line number Diff line number Diff line change
Expand Up @@ -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
18 changes: 4 additions & 14 deletions pgx_async/src/pgx_async.mli
Original file line number Diff line number Diff line change
@@ -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. *)
Expand Down

0 comments on commit 993def6

Please sign in to comment.