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) =
79
79
Printf. printf " %s %s %s\n "
80
80
(r#getvalue i 0 ) (r#getvalue i 1 ) (r#getvalue i 2 )
81
81
done ;
82
+
83
+ (* Run it in single-row mode. *)
82
84
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
84
87
match fetch_result c with
85
88
| None -> assert false
86
- | Some r ->
89
+ | Some r when i < 2 ->
87
90
assert (r#status = Single_tuple );
88
91
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 )
90
95
done ;
91
96
assert (fetch_result c = None )
92
97
Original file line number Diff line number Diff line change @@ -205,7 +205,7 @@ val string_of_ftype : ftype -> string
205
205
(* * [string_of_ftype ftype] converts [ftype] to a string. *)
206
206
207
207
val 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] . *)
209
209
210
210
211
211
(* * {2 Handling results of commands and queries} *)
You can’t perform that action at this time.
0 commit comments