|
Server : Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/1.0.0-fips mod_auth_passthrough/2.1 mod_bwlimited/1.4 System : Linux server.jackjohnson.com 2.6.32-279.5.2.el6.x86_64 #1 SMP Fri Aug 24 01:07:11 UTC 2012 x86_64 User : jackjohn ( 502) PHP Version : 5.3.17 Disable Function : NONE Directory : /installd/perl588installer/DBI-1.607/blib/man3/ |
Upload File : |
.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sh \" Subsection heading
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings. \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote. | will give a
.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
.\" expand to `' in nroff, nothing in troff, for use with C<>.
.tr \(*W-|\(bv\*(Tr
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
. ds -- \(*W-
. ds PI pi
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
. ds L" ""
. ds R" ""
. ds C` ""
. ds C' ""
'br\}
.el\{\
. ds -- \|\(em\|
. ds PI \(*p
. ds L" ``
. ds R" ''
'br\}
.\"
.\" If the F register is turned on, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.if \nF \{\
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. nr % 0
. rr F
.\}
.\"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.hy 0
.if n .na
.\"
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
.\" Fear. Run. Save yourself. No user-serviceable parts.
. \" fudge factors for nroff and troff
.if n \{\
. ds #H 0
. ds #V .8m
. ds #F .3m
. ds #[ \f1
. ds #] \fP
.\}
.if t \{\
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
. ds #V .6m
. ds #F 0
. ds #[ \&
. ds #] \&
.\}
. \" simple accents for nroff and troff
.if n \{\
. ds ' \&
. ds ` \&
. ds ^ \&
. ds , \&
. ds ~ ~
. ds /
.\}
.if t \{\
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
.\}
. \" troff and (daisy-wheel) nroff accents
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
.ds ae a\h'-(\w'a'u*4/10)'e
.ds Ae A\h'-(\w'A'u*4/10)'E
. \" corrections for vroff
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
. \" for low resolution devices (crt and lpr)
.if \n(.H>23 .if \n(.V>19 \
\{\
. ds : e
. ds 8 ss
. ds o a
. ds d- d\h'-1'\(ga
. ds D- D\h'-1'\(hy
. ds th \o'bp'
. ds Th \o'LP'
. ds ae ae
. ds Ae AE
.\}
.rm #[ #] #H #V #F C
.\" ========================================================================
.\"
.IX Title "DBD::File 3"
.TH DBD::File 3 "2008-07-22" "perl v5.8.8" "User Contributed Perl Documentation"
.SH "NAME"
DBD::File \- Base class for writing DBI drivers
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
.Vb 4
\& This module is a base class for writing other DBDs.
\& It is not intended to function as a DBD itself.
\& If you want to access flatfiles, use DBD::AnyData, or DBD::CSV,
\& (both of which are subclasses of DBD::File).
.Ve
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
The DBD::File module is not a true \s-1DBI\s0 driver, but an abstract
base class for deriving concrete \s-1DBI\s0 drivers from it. The implication is,
that these drivers work with plain files, for example \s-1CSV\s0 files or
\&\s-1INI\s0 files. The module is based on the SQL::Statement module, a simple
\&\s-1SQL\s0 engine.
.PP
See \s-1DBI\s0 for details on \s-1DBI\s0, SQL::Statement for details on
SQL::Statement and \s-1DBD::CSV\s0 or DBD::IniFile for example
drivers.
.Sh "Metadata"
.IX Subsection "Metadata"
The following attributes are handled by \s-1DBI\s0 itself and not by DBD::File,
thus they all work like expected:
.PP
.Vb 9
\& Active
\& ActiveKids
\& CachedKids
\& CompatMode (Not used)
\& InactiveDestroy
\& Kids
\& PrintError
\& RaiseError
\& Warn (Not used)
.Ve
.PP
The following \s-1DBI\s0 attributes are handled by DBD::File:
.IP "AutoCommit" 4
.IX Item "AutoCommit"
Always on
.IP "ChopBlanks" 4
.IX Item "ChopBlanks"
Works
.IP "\s-1NUM_OF_FIELDS\s0" 4
.IX Item "NUM_OF_FIELDS"
Valid after \f(CW\*(C`$sth\-\*(C'\fRexecute>
.IP "\s-1NUM_OF_PARAMS\s0" 4
.IX Item "NUM_OF_PARAMS"
Valid after \f(CW\*(C`$sth\-\*(C'\fRprepare>
.IP "\s-1NAME\s0" 4
.IX Item "NAME"
Valid after \f(CW\*(C`$sth\-\*(C'\fRexecute>; undef for Non-Select statements.
.IP "\s-1NULLABLE\s0" 4
.IX Item "NULLABLE"
Not really working, always returns an array ref of one's, as \s-1DBD::CSV\s0
doesn't verify input data. Valid after \f(CW\*(C`$sth\-\*(C'\fRexecute>; undef for
Non-Select statements.
.PP
These attributes and methods are not supported:
.PP
.Vb 4
\& bind_param_inout
\& CursorName
\& LongReadLen
\& LongTruncOk
.Ve
.PP
Additional to the \s-1DBI\s0 attributes, you can use the following dbh
attribute:
.IP "f_dir" 4
.IX Item "f_dir"
This attribute is used for setting the directory where \s-1CSV\s0 files are
opened. Usually you set it in the dbh, it defaults to the current
directory (\*(L".\*(R"). However, it is overwritable in the statement handles.
.Sh "Driver private methods"
.IX Subsection "Driver private methods"
.IP "data_sources" 4
.IX Item "data_sources"
The \f(CW\*(C`data_sources\*(C'\fR method returns a list of subdirectories of the current
directory in the form \*(L"DBI:CSV:f_dir=$dirname\*(R".
.Sp
If you want to read the subdirectories of another directory, use
.Sp
.Vb 2
\& my($drh) = DBI->install_driver("CSV");
\& my(@list) = $drh->data_sources('f_dir' => '/usr/local/csv_data' );
.Ve
.IP "list_tables" 4
.IX Item "list_tables"
This method returns a list of file names inside \f(CW$dbh\fR\->{'f_dir'}.
Example:
.Sp
.Vb 2
\& my($dbh) = DBI->connect("DBI:CSV:f_dir=/usr/local/csv_data");
\& my(@list) = $dbh->func('list_tables');
.Ve
.Sp
Note that the list includes all files contained in the directory, even
those that have non-valid table names, from the view of \s-1SQL\s0.
.SH "KNOWN BUGS"
.IX Header "KNOWN BUGS"
.IP "\(bu" 8
The module is using \fIflock()\fR internally. However, this function is not
available on all platforms. Using \fIflock()\fR is disabled on MacOS and
Windows 95: There's no locking at all (perhaps not so important on
MacOS and Windows 95, as there's a single user anyways).
.SH "AUTHOR AND COPYRIGHT"
.IX Header "AUTHOR AND COPYRIGHT"
This module is currently maintained by
.PP
Jeff Zucker < jzucker @ cpan.org >
.PP
The original author is Jochen Wiedmann.
.PP
Copyright (C) 2004 by Jeff Zucker
Copyright (C) 1998 by Jochen Wiedmann
.PP
All rights reserved.
.PP
You may freely distribute and/or modify this module under the terms of either the \s-1GNU\s0 General Public License (\s-1GPL\s0) or the Artistic License, as specified in
the Perl \s-1README\s0 file.
.SH "SEE ALSO"
.IX Header "SEE ALSO"
\&\s-1DBI\s0, Text::CSV_XS, SQL::Statement