|
217 | 217 | }
|
218 | 218 |
|
219 | 219 | sub _max_col_lengths {
|
| 220 | + # Compute result set PRECISION (data length) by looking for the |
| 221 | + # max lengths of each column's data. |
220 | 222 | my ($numFields, $rows) = @_;
|
221 | 223 | my @precision = (0,) x $numFields;
|
222 | 224 | my $len;
|
@@ -278,33 +280,38 @@ No username and password are needed.
|
278 | 280 |
|
279 | 281 | =item *
|
280 | 282 |
|
281 |
| -The C<$statement> here is an arbitrary statement or name you want |
282 |
| -to provide as identity of your data. If you're using DBI::Profile |
283 |
| -it will appear in the profile data. |
| 283 | +The C<$statement> here is an arbitrary statement or name you want to |
| 284 | +provide as identity of your data. If you're using DBI::Profile it will |
| 285 | +appear in the profile data. |
284 | 286 |
|
285 |
| -Generally it's expected that you are preparing a statement handle |
286 |
| -as if a C<select> statement happened. |
| 287 | +Generally it's expected that you are preparing a statement handle as if |
| 288 | +a C<select> statement happened. |
287 | 289 |
|
288 | 290 | =item *
|
289 | 291 |
|
290 |
| -C<$data> is a reference to the data you are providing, given as an array of arrays. |
| 292 | +C<$data> is a reference to the data you are providing, given as an array |
| 293 | +of arrays. |
291 | 294 |
|
292 | 295 | =item *
|
293 | 296 |
|
294 |
| -C<$names> is a reference an array of column names for the C<$data> you are providing. |
295 |
| -The number and order should match the number and ordering of the C<$data> columns. |
| 297 | +C<$names> is a reference an array of column names for the C<$data> you |
| 298 | +are providing. The number and order should match the number and |
| 299 | +ordering of the C<$data> columns. |
296 | 300 |
|
297 | 301 | =item *
|
298 | 302 |
|
299 |
| -C<%attr> is a hash of other standard DBI attributes that you might pass to a prepare statement. |
| 303 | +C<%attr> is a hash of other standard DBI attributes that you might pass |
| 304 | +to a prepare statement. |
300 | 305 |
|
301 |
| -Currently only NAME, TYPE, and PRECISION are supported. PRECISION will be automatically computed if not supplied. |
| 306 | +Currently only NAME, TYPE, and PRECISION are supported. TYPE defaults |
| 307 | +to SQL_VARCHAR. PRECISION will be lazily computed if not supplied. |
302 | 308 |
|
303 | 309 | =back
|
304 | 310 |
|
305 | 311 | =head1 BUGS
|
306 | 312 |
|
307 |
| -Using this module to prepare INSERT-like statements is not currently documented. |
| 313 | +Using this module to prepare INSERT-like statements is not currently |
| 314 | +documented. |
308 | 315 |
|
309 | 316 | =head1 AUTHOR AND COPYRIGHT
|
310 | 317 |
|
|
0 commit comments