Markus Mottl avatar Markus Mottl committed 00f3412

Minor code cleanups

Comments (0)

Files changed (2)

lib/postgresql.ml

     connection -> result_status -> result = "PQmakeEmptyPGresult_stub"
 
   external ntuples : result -> int = "PQntuples_stub" "noalloc"
-
-(* FIXME: switch to noalloc once PostgreSQL 8.2 is out for CentOS *)
-(*   external nparams : result -> int = "PQnparams_stub" "noalloc" *)
   external nparams : result -> int = "PQnparams_stub"
 
   external nfields : result -> int = "PQnfields_stub" "noalloc"
   external fnumber : result -> string -> int ="PQfnumber_stub" "noalloc"
   external fformat : result -> int -> FFormat.t = "PQfformat_stub" "noalloc"
   external ftype : result -> int -> oid = "PQftype_stub" "noalloc"
-
-(* FIXME: switch to noalloc once PostgreSQL 8.2 is out for CentOS *)
-(*   external paramtype : result -> int -> oid = "PQparamtype_stub" "noalloc" *)
   external paramtype : result -> int -> oid = "PQparamtype_stub"
 
   external fmod : result -> int -> int = "PQfmod_stub" "noalloc"
   external binary_tuples : result -> bool = "PQbinaryTuples_stub" "noalloc"
 
   external getvalue : result -> int -> int -> string = "PQgetvalue_stub"
-  external get_escaped_value : result -> int -> int -> string = "PQgetescvalue_stub"
+
+  external get_escaped_value :
+    result -> int -> int -> string = "PQgetescval_stub"
 
   external getisnull :
     result -> int -> int -> bool = "PQgetisnull_stub" "noalloc"
 class result res =
   let nfields = Stub.nfields res in
   let ntuples = Stub.ntuples res in
-(* FIXME: get rid of laziness once PostgreSQL 8.2 is out for CentOS *)
-(*   let nparams = Stub.nparams res in *)
   let nparams = lazy (Stub.nparams res) in
-  let binary_tuples = Stub.binary_tuples res in
   let check_field field =
     if field < 0 || field >= nfields then
       raise (Error (Field_out_of_range (field, nfields))) in
   method ntuples = ntuples
   method nparams = Lazy.force nparams
   method nfields = nfields
-  method binary_tuples = binary_tuples
+  method binary_tuples = Stub.binary_tuples res
   method fname field = check_field field; Stub.fname res field
 
   method fnumber s =

lib/postgresql.mli

   *)
 
   method get_escaped_value : int -> int -> string
-  (** [#get_escaped_value tuple field] @return escaped value of [field] in [tuple].
+  (** [#get_escaped_value tuple field] @return escaped value of [field] in
+      [tuple].
 
       @raise Error if tuple out of range.
       @raise Error if field out of range.
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.