File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -79,14 +79,19 @@ let test (c : connection) =
7979 Printf. printf " %s %s %s\n "
8080 (r#getvalue i 0 ) (r#getvalue i 1 ) (r#getvalue i 2 )
8181 done ;
82+
83+ (* Run it in single-row mode. *)
8284 c#send_query_prepared " test_sel" ;
83- for i = 0 to 1 do
85+ c#set_single_row_mode;
86+ for i = 0 to 2 do
8487 match fetch_result c with
8588 | None -> assert false
86- | Some r ->
89+ | Some r when i < 2 ->
8790 assert (r#status = Single_tuple );
8891 Printf. printf " %s %s %s\n "
89- (r#getvalue i 0 ) (r#getvalue i 1 ) (r#getvalue i 2 )
92+ (r#getvalue 0 0 ) (r#getvalue 0 1 ) (r#getvalue 0 2 )
93+ | Some r ->
94+ assert (r#status = Tuples_ok )
9095 done ;
9196 assert (fetch_result c = None )
9297
Original file line number Diff line number Diff line change @@ -205,7 +205,7 @@ val string_of_ftype : ftype -> string
205205(* * [string_of_ftype ftype] converts [ftype] to a string. *)
206206
207207val ftype_of_string : string -> ftype
208- (* * [string_of_ftype ftype] converts [ftype] to a string . *)
208+ (* * [string_of_ftype ftype] converts string to a [ftype] . *)
209209
210210
211211(* * {2 Handling results of commands and queries} *)
You can’t perform that action at this time.
0 commit comments