.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .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" '' . ds C` . ds C' '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 >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Compat 3pm" .TH Compat 3pm "2021-01-05" "perl v5.32.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" DBIx::Compat \- Perl extension for Compatibility Infos about DBD Drivers .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use DBIx::Compat; \& \& my $HaveTypes = DBIx::Compat::GetItem ($drv, \*(AqHaveTypes\*(Aq) ; .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" DBIx::Compat contains a hash which gives information about \s-1DBD\s0 drivers, to allow to write driver independent programs. .PP Currently there are the following attributes defined: .SS "\fBListFields\fP" .IX Subsection "ListFields" A function which will return information about all fields of an table. Needs an database handle and a tablename as argument. Must at least return the fieldnames and the fieldtypes. .PP .Vb 1 \& Example: \& \& $ListFields = $DBIx::Compat::Compat{$Driver}{ListFields} ; \& $sth = &{$ListFields}($DBHandle, $Table) or die "Cannot list fields" ; \& \& @{ $sth \-> {NAME} } ; # array of fieldnames \& @{ $sth \-> {TYPE} } ; # array of filedtypes \& \& $sth \-> finish ; .Ve .SS "\fBListTables\fP" .IX Subsection "ListTables" A function which will return an array of all tables of the datasource. Defaults to \&\f(CW$dbh\fR \-> \f(CW\*(C`tables\*(C'\fR. .SS "\fBNumericTypes\fP" .IX Subsection "NumericTypes" Hash which contains one entry for all datatypes that are numeric. .SS "\fBSupportJoin\fP" .IX Subsection "SupportJoin" Set to true if the \s-1DBMS\s0 supports joins (select with multiple tables) .SS "\fBSupportSQLJoin\fP" .IX Subsection "SupportSQLJoin" Set to 1 if the \s-1DBMS\s0 supports \s-1INNER/LEFT/RIGHT JOIN\s0 Syntax in \s-1SQL\s0 select. Set to 2 if \s-1DBMS\s0 needs a *= b syntax for inner join (MS-SQL, Sybase). Set to 3 if \s-1DBMS\s0 needs a = b (+) syntax for inner join (Oracle syntax). .SS "\fBSQLJoinOnly2Tabs\fP" .IX Subsection "SQLJoinOnly2Tabs" Set to true if \s-1DBMS\s0 can only support two tables in inner joins. .SS "\fBHaveTypes\fP" .IX Subsection "HaveTypes" Set to true if \s-1DBMS\s0 supports datatypes (most \s-1DBMS\s0 will do) .SS "\fBNeedNullInCreate\fP" .IX Subsection "NeedNullInCreate" Set to \f(CW\*(AqNULL\*(Aq\fR if \s-1DBMS\s0 requires the \s-1NULL\s0 keyword when creating tables where fields should contains nulls. .SS "\fBEmptyIsNull\fP" .IX Subsection "EmptyIsNull" Set to true if an empty string ('') and \s-1NULL\s0 is the same for the \s-1DBMS.\s0 .SS "\fBLimitOffset\fP" .IX Subsection "LimitOffset" An function which will be used to create a \s-1SQL\s0 text for limiting the number of fetched rows and selecting the starting row in selects. .SH "\fBKeys that aren't needed anymore\fP" .IX Header "Keys that aren't needed anymore" .SS "\fBPlaceholders\fP" .IX Subsection "Placeholders" Gives information if and how placeholders are supported: .IP "\fB0\fR = Not supported" 4 .IX Item "0 = Not supported" .PD 0 .IP "\fB1\fR = Supported, but not fully, unknown how much" 4 .IX Item "1 = Supported, but not fully, unknown how much" .IP "\fB2\fR = Supported, but perl type must be the same as type in db" 4 .IX Item "2 = Supported, but perl type must be the same as type in db" .IP "\fB3\fR = Supported, but can not give a string when a numeric type is in the db" 4 .IX Item "3 = Supported, but can not give a string when a numeric type is in the db" .IP "\fB10\fR = Supported under all circumstances" 4 .IX Item "10 = Supported under all circumstances" .PD .SS "\fBQuoteTypes\fP" .IX Subsection "QuoteTypes" Gives information which datatypes must be quoted when passed literal (not via a placeholder). Contains a hash with all type number which need to be quoted. .PP .Vb 1 \& $DBIx::Compat::Compat{$Driver}{QuoteTypes}{$Type} .Ve .PP will be true when the type in \f(CW$Type\fR for the driver \f(CW$Driver\fR must be quoted. .SH "Supported Drivers" .IX Header "Supported Drivers" Currently there are entry for .IP "\fBDBD::mSQL\fR" 4 .IX Item "DBD::mSQL" .PD 0 .IP "\fBDBD::mysql\fR" 4 .IX Item "DBD::mysql" .IP "\fBDBD::Pg\fR" 4 .IX Item "DBD::Pg" .IP "\fBDBD::Solid\fR" 4 .IX Item "DBD::Solid" .IP "\fB\s-1DBD::ODBC\s0\fR" 4 .IX Item "DBD::ODBC" .IP "\fB\s-1DBD::CSV\s0\fR" 4 .IX Item "DBD::CSV" .IP "\fBDBD::Oracle\fR" 4 .IX Item "DBD::Oracle" .IP "\fBDBD::Sysbase\fR" 4 .IX Item "DBD::Sysbase" .IP "\fBDBD::Informix\fR" 4 .IX Item "DBD::Informix" .PD .PP if you detect an error in the definition or add an definition for a new \&\s-1DBD\s0 driver, please mail it to the author. .SH "AUTHOR" .IX Header "AUTHOR" G.Richter .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBperl\fR\|(1), \s-1\fBDBI\s0\fR\|(3), \fBDBIx::Recordset\fR\|(3)