dbd::file.3
来自「视频监控网络部分的协议ddns,的模块的实现代码,请大家大胆指正.」· 3 代码 · 共 266 行
3
266 行
.\" Automatically generated by Pod::Man 2.16 (Pod::Simple 3.05).\".\" 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. \*(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-.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\}.\".\" Escape single quotes in literal strings from groff's Unicode transform..ie \n(.g .ds Aq \(aq.el .ds Aq '.\".\" 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..ie \nF \{\. de IX. tm Index:\\$1\t\\n%\t"\\$2"... nr % 0. rr F.\}.el \{\. de IX...\}.\".\" 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 "2007-09-27" "perl v5.10.0" "User Contributed Perl Documentation".\" For nroff, turn off justification. Always turn off hyphenation; it makes.\" way too many mistakes in technical documents..if n .ad l.nh.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 abstractbase 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..PPSee \s-1DBI\s0 for details on \s-1DBI\s0, SQL::Statement for details onSQL::Statement and \s-1DBD::CSV\s0 or DBD::IniFile for exampledrivers..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.PPThe 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\s0doesn't verify input data. Valid after \f(CW\*(C`$sth\-\*(C'\fRexecute>; undef forNon-Select statements..PPThese attributes and methods are not supported:.PP.Vb 4\& bind_param_inout\& CursorName\& LongReadLen\& LongTruncOk.Ve.PPAdditional to the \s-1DBI\s0 attributes, you can use the following dbhattribute:.IP "f_dir" 4.IX Item "f_dir"This attribute is used for setting the directory where \s-1CSV\s0 files areopened. Usually you set it in the dbh, it defaults to the currentdirectory (\*(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 currentdirectory in the form \*(L"DBI:CSV:f_dir=$dirname\*(R"..SpIf you want to read the subdirectories of another directory, use.Sp.Vb 2\& my($drh) = DBI\->install_driver("CSV");\& my(@list) = $drh\->data_sources(\*(Aqf_dir\*(Aq => \*(Aq/usr/local/csv_data\*(Aq );.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(\*(Aqlist_tables\*(Aq);.Ve.SpNote that the list includes all files contained in the directory, eventhose that have non-valid table names, from the view of \s-1SQL\s0..SH "KNOWN BUGS".IX Header "KNOWN BUGS".IP "\(bu" 8The module is using \fIflock()\fR internally. However, this function is notavailable on all platforms. Using \fIflock()\fR is disabled on MacOS andWindows 95: There's no locking at all (perhaps not so important onMacOS 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.PPJeff Zucker < jzucker @ cpan.org >.PPThe original author is Jochen Wiedmann..PPCopyright (C) 2004 by Jeff ZuckerCopyright (C) 1998 by Jochen Wiedmann.PPAll rights reserved..PPYou 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 inthe Perl \s-1README\s0 file..SH "SEE ALSO".IX Header "SEE ALSO"\&\s-1DBI\s0, Text::CSV_XS, SQL::Statement
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?