|
NAMEOryx::DBI::Util - abstract base class for Oryx DBI utilitiesDESCRIPTIONOryx::DBI::Util represents an interface to be implemented in order to add support for additional RDBMS'. The following methods must be implemented:METHODS
IMPLEMENTORSIn order to allow Oryx to store data in a database other than those already supported, one need only provide an implementation for a utility class for use with the appropriate driver.The utility class should inherit from Oryx::DBI::Util and should provide implementations appropriate for all of the methods documented here. Since DBI and standard SQL make the implementation very similar across databases, many of the methods are defined here already. You should examine this class for the default implementations to see if they need to be overridden. You will, at the very least, need to provide either an array named %SQL_TYPES in your class or and implementation of "type2sql()": # Taken from Oryx::DBI::Util::Pg at the time of writing our %SQL_TYPES = ( 'Oid' => 'serial PRIMARY KEY', 'Integer' => 'integer', 'String' => 'varchar', 'Text' => 'text', 'Binary' => 'bytea', 'Float' => 'numeric', 'Boolean' => 'integer', 'DateTime' => 'timestamp', ); You may also want to examine the code found in the utilities already provided. As of this writing, this includes Oryx::DBI::Util::Pg for PostgreSQL accessed via DBD::Pg, Oryx::DBI::Util::mysql for MySQL accessed via DBD::mysql, and Oryx::DBI::Util::SQLite for SQLite accessed via DBD::SQLite. SEE ALSOOryx::DBI, Oryx::DBI::Class, Oryx::DBI::Util::Pg, Oryx::DBI::Util::mysql, Oryx::DBI::Util::SQLite, DBIAUTHORSRichard Hundt <richard NO SPAM AT protea-systems.com>Andrew Sterling Hanenkamp <hanenkamp@cpan.org> COPYRIGHT AND LICENSECopyright (C) 2005 Richard Hundt.This library is free software and may be used under the same terms as Perl itself.
Visit the GSP FreeBSD Man Page Interface. |