Skip to content

Commit 000053c

Browse files
committed
Fixed odoc method reference problems
1 parent 88e04a7 commit 000053c

File tree

1 file changed

+42
-32
lines changed

1 file changed

+42
-32
lines changed

src/postgresql.mli

Lines changed: 42 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ type result_status =
116116
| Nonfatal_error
117117
| Fatal_error
118118
| Copy_both
119-
| Single_tuple (** One tuple of a result set ({!set_single_row_mode}) *)
119+
| Single_tuple
120+
(** One tuple of a result set ({!connection.set_single_row_mode}) *)
120121

121122
(** Result of put_copy_data and put_copy_end *)
122123
type put_copy_result =
@@ -482,7 +483,8 @@ val conndefaults : unit -> conninfo_option array
482483
483484
@param startonly
484485
If true, initiate a non-blocking connect procedure, which involves
485-
cooperative calls to {!connect_poll} before the connection is usable.
486+
cooperative calls to {!connection.connect_poll} before the connection is
487+
usable.
486488
487489
@raise Error if there is a connection failure. *)
488490
class connection :
@@ -545,8 +547,9 @@ object
545547
546548
{e Warning:} This function is unsafe in combination with a number of libpq
547549
entry points, and should not be used for now. As a workaround,
548-
{!#set_notice_processing} can be used to silence notices, if this is more
549-
appropriate than the default behaviour of printing them to standard error.
550+
{!connection.set_notice_processing} can be used to silence notices, if
551+
this is more appropriate than the default behaviour of printing them to
552+
standard error.
550553
551554
@raise Error if there is a connection error. *)
552555

@@ -696,15 +699,15 @@ object
696699
method describe_prepared : string -> result
697700
(** [#describe_prepared stm_name] submits a request to obtain information
698701
about the specified prepared statement, and waits for completion.
699-
{!describe_prepared} allows an application to obtain information about a
700-
previously prepared statement. The [stm_name] parameter can be the empty
701-
string ("") to reference the unnamed statement, otherwise it must be the
702-
name of an existing prepared statement. On success, a {!result} with
703-
status [Command_ok] is returned. The methods {!result.nparams} and
704-
{!result.paramtype} of the class [result] can be used to obtain
705-
information about the parameters of the prepared statement, and the
706-
methods {!result.nfields}, {!result.fname} and {!result.ftype} provide
707-
information about the result columns (if any) of the statement.
702+
{!connection.describe_prepared} allows an application to obtain
703+
information about a previously prepared statement. The [stm_name]
704+
parameter can be the empty string ("") to reference the unnamed statement,
705+
otherwise it must be the name of an existing prepared statement. On
706+
success, a {!result} with status [Command_ok] is returned. The methods
707+
{!result.nparams} and {!result.paramtype} of the class [result] can be
708+
used to obtain information about the parameters of the prepared statement,
709+
and the methods {!result.nfields}, {!result.fname} and {!result.ftype}
710+
provide information about the result columns (if any) of the statement.
708711
709712
To prepare a statement use the SQL command PREPARE.
710713
@@ -741,16 +744,18 @@ object
741744

742745
method send_prepare : ?param_types:oid array -> string -> string -> unit
743746
(** [#send_prepare ?param_types stm_name query] sends a query preparation
744-
without waiting for the result. This does the same as {!prepare} except
745-
that the status is reported by {!get_result} when available.
747+
without waiting for the result. This does the same as
748+
{!connection.prepare} except that the status is reported by
749+
{!connection.get_result} when available.
746750
747751
@raise Error if there is a connection error. *)
748752

749753
method send_query_prepared :
750754
?params:string array -> ?binary_params:bool array -> string -> unit
751755
(** [#send_query_prepared ?params ?binary_params stm_name] is an asynchronous
752-
version of {!query_prepared}. The semantics is otherwise the same, and the
753-
result is reported by {!get_result} when available.
756+
version of {!connection.exec_prepared}. The semantics is otherwise the
757+
same, and the result is reported by {!connection.get_result} when
758+
available.
754759
755760
@param params default = [||]
756761
@param binary_params default = [||]
@@ -760,20 +765,22 @@ object
760765
method send_describe_prepared : string -> unit
761766
(** [#send_describe_prepared stm_name] sends a request for a description of a
762767
prepared query without waiting for the result. The result must be fetched
763-
with {!get_result} when it becomes available. Otherwise it does the same
764-
as {!describe_prepared}.
768+
with {!connection.get_result} when it becomes available. Otherwise it does
769+
the same as {!connection.describe_prepared}.
765770
766771
@raise Error if there is a connection error. *)
767772

768773
method send_describe_portal : string -> unit
769774
(** [#send_describe_portal portal_name] sends a request for a description of
770-
the named portal. The result must be fetched with {!get_result}.
775+
the named portal. The result must be fetched with
776+
{!connection.get_result}.
771777
772778
@raise Error if there is a connection error. *)
773779

774780
method set_single_row_mode : unit
775-
(** [#set_single_row_mode] called right after {!send_query} or a sibling
776-
function causes the returned rows to be split into individual results. *)
781+
(** [#set_single_row_mode] called right after {!connection.send_query} or a
782+
sibling function causes the returned rows to be split into individual
783+
results. *)
777784

778785
method get_result : result option
779786
(** [get_result]
@@ -802,7 +809,7 @@ object
802809
connection in [Command_ok] or failed state. In non-blocking mode, returns
803810
{!Put_copy_not_queued} if the termination message was not queued due to
804811
full buffers. Also, to ensure delivery of data in non-blocking mode,
805-
repeatedly wait for write-ready an call {!#flush}.
812+
repeatedly wait for write-ready an call {!connection.flush}.
806813
807814
@param error_msg
808815
if set, force the copy operation to fail with the given message. *)
@@ -812,7 +819,8 @@ object
812819
Only single complete rows are returned. In synchronous mode, the call will
813820
wait for completion of the next row. In asynchronous mode it will return
814821
immediately with [Get_copy_wait] if the row transfer is incomplete. In
815-
that case, wait for read-ready and call {!#consume_input} before retrying.
822+
that case, wait for read-ready and call {!connection.consume_input} before
823+
retrying.
816824
817825
@param async default = false *)
818826

@@ -884,11 +892,12 @@ object
884892
(** Asynchronous operations and non blocking mode *)
885893

886894
method connect_poll : polling_status
887-
(** After creating a connection with [~startonly:true], {!connect_poll} must
888-
be called a number of times before the connection can be used. The precise
889-
procedure is described in the libpq manual, but the following code should
890-
capture the idea, assuming monadic concurrency primitives [return] and
891-
[>>=] along with polling functions [wait_for_read] and [wait_for_write]:
895+
(** After creating a connection with [~startonly:true],
896+
{!connection.connect_poll} must be called a number of times before the
897+
connection can be used. The precise procedure is described in the libpq
898+
manual, but the following code should capture the idea, assuming monadic
899+
concurrency primitives [return] and [>>=] along with polling functions
900+
[wait_for_read] and [wait_for_write]:
892901
{[
893902
let my_async_connect () =
894903
let c = new connection () in
@@ -906,11 +915,12 @@ object
906915
See also [examples/async.ml]. *)
907916

908917
method reset_start : bool
909-
(** An asynchronous variant of {!reset}. Use {!reset_poll} to finish
910-
re-establishing the connection. *)
918+
(** An asynchronous variant of {!connection.reset}. Use
919+
{!connection.reset_poll} to finish re-establishing the connection. *)
911920

912921
method reset_poll : polling_status
913-
(** Used analogously to {!connect_poll} after calling {!reset_start}. *)
922+
(** Used analogously to {!connection.connect_poll} after calling
923+
{!connection.reset_start}. *)
914924

915925
method set_nonblocking : bool -> unit
916926
(** [set_nonblocking b] sets state of the connection to nonblocking if [b] is

0 commit comments

Comments
 (0)