Skip to content

Commit 134d89a

Browse files
pilcrowMike
authored andcommitted
Document PRECISION computation and long-standing default TYPE. Reformat POD
1 parent 3fe0350 commit 134d89a

File tree

1 file changed

+18
-11
lines changed

1 file changed

+18
-11
lines changed

lib/DBD/Sponge.pm

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,8 @@ use warnings;
219219
}
220220

221221
sub _max_col_lengths {
222+
# Compute result set PRECISION (data length) by looking for the
223+
# max lengths of each column's data.
222224
my ($numFields, $rows) = @_;
223225
my @precision = (0,) x $numFields;
224226
my $len;
@@ -280,33 +282,38 @@ No username and password are needed.
280282
281283
=item *
282284
283-
The C<$statement> here is an arbitrary statement or name you want
284-
to provide as identity of your data. If you're using DBI::Profile
285-
it will appear in the profile data.
285+
The C<$statement> here is an arbitrary statement or name you want to
286+
provide as identity of your data. If you're using DBI::Profile it will
287+
appear in the profile data.
286288
287-
Generally it's expected that you are preparing a statement handle
288-
as if a C<select> statement happened.
289+
Generally it's expected that you are preparing a statement handle as if
290+
a C<select> statement happened.
289291
290292
=item *
291293
292-
C<$data> is a reference to the data you are providing, given as an array of arrays.
294+
C<$data> is a reference to the data you are providing, given as an array
295+
of arrays.
293296
294297
=item *
295298
296-
C<$names> is a reference an array of column names for the C<$data> you are providing.
297-
The number and order should match the number and ordering of the C<$data> columns.
299+
C<$names> is a reference an array of column names for the C<$data> you
300+
are providing. The number and order should match the number and
301+
ordering of the C<$data> columns.
298302
299303
=item *
300304
301-
C<%attr> is a hash of other standard DBI attributes that you might pass to a prepare statement.
305+
C<%attr> is a hash of other standard DBI attributes that you might pass
306+
to a prepare statement.
302307
303-
Currently only NAME, TYPE, and PRECISION are supported. PRECISION will be automatically computed if not supplied.
308+
Currently only NAME, TYPE, and PRECISION are supported. TYPE defaults
309+
to SQL_VARCHAR. PRECISION will be lazily computed if not supplied.
304310
305311
=back
306312
307313
=head1 BUGS
308314
309-
Using this module to prepare INSERT-like statements is not currently documented.
315+
Using this module to prepare INSERT-like statements is not currently
316+
documented.
310317
311318
=head1 AUTHOR AND COPYRIGHT
312319

0 commit comments

Comments
 (0)