On 02-03-2010 00:58:56 +0100, Guillaume Yziquel wrote:
Hello.
Here are a few functions/methods from the postgresql-ocaml binding.
class type result = object (** Main routines *)
method nfields : int (** [#nfields] @return the number of fields in a query result. *)
method fname : int -> string (** [#fname n] @return the name of the [n]th field.
@raise Error if field out of range. *)
method fnumber : string -> int (** [#fnumber field] @return the index of the field named [field].
@raise Not_found if no such named field. *)
I'm looking for equivalents of fname and fnumber methods in MAPI. Couldn't find an equivalent. So, is there a way, when you get the result of a query, to get the names of the fields in the result?
Did you check mapi_get_field_count and mapi_get_table, mapi_get_name, mapi_get_type and mapi_get_len? Ok, I admit they are actually not documented at all, not even in the code.