Apache::AxKit::Provider::RDBMS - Perl extension AxKit
<Location /test.html> AxContentProvider Apache::AxKit::Provider::RDBMS AxAddStyleMap text/xsl Apache::AxKit::Language::LibXSLT AxAddProcessor text/xsl test.xsl
PerlSetVar DBIString "dbi:SQLite:dbname=/tmp/testsqllite" PerlSetVar DBIQuery "SELECT * FROM bla" </Location>
<Location /test2.html> AxContentProvider Apache::AxKit::Provider::RDBMS AxAddStyleMap text/xsl Apache::AxKit::Language::LibXSL AxAddProcessor text/xsl test.xsl
PerlSetVar RDBMSCacheAdapter "Apache::AxKit::Provider::RDBMS::DBCacheAdapter::SQLite" PerlSetVar RDBMSContentProvider "Apache::AxKit::Provider::RDBMS::ContentProvider::MultiSQL" PerlSetVar DBIString "dbi:SQLite:dbname=/tmp/testsqllite" PerlAddVar DBIQuery "query1 => SELECT * FROM bla" PerlAddVar DBIQuery "query2 => SELECT * FROM bla" PerlAddVar DBIQuery "query3 => SELECT * FROM bla" </Location>
Apache::AxKit::Provider::RDBMS is a custom axkit content provider which can be used to provide XML-Content to AxKit-Framework and even use its highlevel caching. The first release only support one Database namely SQLite but the module is designed to be easily extensible for other databases the only thing which has to be implemented is the DBCacheAdapter
Planned but not implemented for now: * Native Support for following databases (MySQL) => DbCachedAd * Generic Support using SQL-Statements for any SQL-Database
To configure the various databases can/need to set the following variables using PerlSetVar and/or PerlAddVar.
the cache-adapeter used. If not set it defaults to "Apache::AxKit::Provider::RDBMS::DBCacheAdapter::SQLite"
the really database content provider used. If not set defaults to "Apache::AxKit::Provider::RDBMS::ContentProvider::SQL"
the connection string used to connect to the database consult your DBD::*-manpage to find out how it should look like for your database
You can use PerlSetVar in conjunction with A::A::P::RDBMS::ContentProvider::SQL to set the query executed
You can use PerlAddVar in conjunction with A::A::P::RDBMS::ContentProvider::MultiSQL to set multiple queries. The format passed in has to have the following look "queryname => SELECT .... "
<!ELEMENT sql-results (sql-result+)>
<!ELEMENT sql-result ( row* )>
<!ATTLIST sql-result name CDATA>
<!ELEMENT row (column+) >
<!ELEMENT column (#PCDATA)>
<!ATTLIST column name CDATA>
Tom Schindl, <lt>tom.schindl@bestsolution.at<gt>
Copyright (C) 2005 by Tom Schindl
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.
To install Apache::AxKit::Provider::RDBMS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Apache::AxKit::Provider::RDBMS
CPAN shell
perl -MCPAN -e shell install Apache::AxKit::Provider::RDBMS
For more information on module installation, please visit the detailed CPAN module installation guide.