Skip to content

Commit 909db6c

Browse files
committed
Merge branch 'ftype_oid'
2 parents e8ba320 + 0c593d6 commit 909db6c

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

lib/postgresql.ml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -567,10 +567,18 @@ object
567567
check_field field;
568568
ftype_of_oid (Stub.ftype res field)
569569

570+
method ftype_oid field =
571+
check_field field;
572+
Stub.ftype res field
573+
570574
method paramtype field =
571575
check_param field;
572576
ftype_of_oid (Stub.paramtype res field)
573577

578+
method paramtype_oid field =
579+
check_param field;
580+
Stub.paramtype res field
581+
574582
method fmod field = check_field field; Stub.fmod res field
575583
method fsize field = check_field field; Stub.fsize res field
576584

lib/postgresql.mli

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,12 @@ class type result = object
261261
@raise Error if field out of range.
262262
*)
263263

264+
method ftype_oid : int -> oid
265+
(** [#ftype n] @return the oid of the [n]th field.
266+
267+
@raise Error if field out of range.
268+
*)
269+
264270
method paramtype : int -> ftype
265271
(** [#paramtype n] @return the datatype of the indicated statement
266272
parameter. Parameter numbers start at 0. This function is
@@ -271,6 +277,15 @@ class type result = object
271277
@raise Error if field out of range.
272278
*)
273279

280+
method paramtype_oid : int -> oid
281+
(** [#paramtype n] @return the oid of the indicated statement
282+
parameter. Parameter numbers start at 0. This function is
283+
only useful when inspecting the result of [#describe_prepared].
284+
For other types of queries it will return zero.
285+
286+
@raise Error if field out of range.
287+
*)
288+
274289
method fmod : int -> int
275290
(** [#fmod n] @return type-specific modification data of the [n]th field.
276291

0 commit comments

Comments
 (0)