Skip to content

Commit 5ba90b9

Browse files
committed
Fixed binary_result documentation
1 parent 8b4b100 commit 5ba90b9

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

lib/postgresql.mli

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -725,21 +725,24 @@ object
725725
?binary_result:bool ->
726726
string ->
727727
unit
728-
(** [send_query ?param_types ?params ?binary_params query] asynchronous
729-
execution of query or command [query].
728+
(** [send_query ?param_types ?params ?binary_params ?binary_result query]
729+
asynchronous execution of query or command [query].
730730
731731
Additional query parameters can be passed in the [params] array. They must
732732
not be escaped and they can be referred to in [query] as $1, $2, ... The
733733
value [null] can be used in the [params] array to denote an SQL NULL. It
734734
is possible to specify that some of the query parameters are passed as
735-
binary strings using the [binary_params] array.
735+
binary strings using the [binary_params] array. By default, results are
736+
returned in text format, but will be returned in binary format if
737+
[binary_result] is true.
736738
737739
If no (or an empty) query parameter is passed, it is possible to emit
738740
several commands with a single call.
739741
740742
@param param_types default = [||]
741743
@param params default = [||]
742744
@param binary_params default = [||]
745+
@param binary_result default = false
743746
744747
@raise Error if there is a connection error. *)
745748

@@ -760,10 +763,12 @@ object
760763
(** [#send_query_prepared ?params ?binary_params stm_name] is an asynchronous
761764
version of {!connection.exec_prepared}. The semantics is otherwise the
762765
same, and the result is reported by {!connection.get_result} when
763-
available.
766+
available. By default, results are returned in text format, but will be
767+
returned in binary format if [binary_result] is true.
764768
765769
@param params default = [||]
766770
@param binary_params default = [||]
771+
@param binary_result default = false
767772
768773
@raise Error if there is a connection error. *)
769774

0 commit comments

Comments
 (0)