Skip to content

Commit 6a279dc

Browse files
committed
Document PRECISION computation and long-standing default TYPE. Reformat POD
1 parent 2a1c15a commit 6a279dc

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
@@ -217,6 +217,8 @@
217217
}
218218

219219
sub _max_col_lengths {
220+
# Compute result set PRECISION (data length) by looking for the
221+
# max lengths of each column's data.
220222
my ($numFields, $rows) = @_;
221223
my @precision = (0,) x $numFields;
222224
my $len;
@@ -278,33 +280,38 @@ No username and password are needed.
278280
279281
=item *
280282
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.
284286
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.
287289
288290
=item *
289291
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.
291294
292295
=item *
293296
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.
296300
297301
=item *
298302
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.
300305
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.
302308
303309
=back
304310
305311
=head1 BUGS
306312
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.
308315
309316
=head1 AUTHOR AND COPYRIGHT
310317

0 commit comments

Comments
 (0)