GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
SQLEngine::Driver::Trait::DatabaseFlavors(3) User Contributed Perl Documentation SQLEngine::Driver::Trait::DatabaseFlavors(3)

DBIx::SQLEngine::Driver::Trait::DatabaseFlavors - For minor variations in a database

  # Classes can import this behavior if they have further subclasses
  use DBIx::SQLEngine::Driver::Trait::DatabaseFlavors ':all';

This package supports configurations of drivers or database servers which differ from the generic implementation provided by their driver.

Beyond the fundamental subclassing based on driver type lies a more subtle range of variations.

How do we compensate for different versions of a database system? For example, newer versions of MySQL support a number of features that the old ones don't: transactions were added in 3.23 (for some table types); union selects were added in 4.0; and stored procedures are being added in 5.0. Similarly DBD::SQLite's functionality is limited by the version of the SQLite C library is in use, and DBD::AnyData's level of functionality depends on which version of SQL::Statement is installed.

Similarly, how do we detect driver/server combinations that need extra help? For example, placeholders will fail for Linux users of DBD::Sybase connecting to MS SQL Servers on Windows, so they need a special subclass which uses the NoPlaceholders trait.

This is handled by the "dbms_flavor" interface. When a flavor is selected, detected, or defaulted, the driver in question is reblessed into an appropriate subclass, such as Driver::MySQL::3_23, Driver::MySQL::5_0, or Driver::Sybase::MSSQL.

You do not need to use this package directly; it is used internally by those driver subclasses which need it.

For more information about Driver Traits, see "About Driver Traits" in DBIx::SQLEngine::Driver.

_init()
  $sqldb->_init ()
    

Calls select_default_dbms_flavor().

Internal method, called by DBIx::AnyDBD after connection is made and class hierarchy has been juggled.

default_dbms_flavor()
  $sqldb->default_dbms_flavor() : $flavor_name
    

Subclass hook. Default returns empty string, to not select any flavor.

detect_dbms_flavor()
  $sqldb->detect_dbms_flavor() : $flavor_name
    

Subclass hook. Default returns empty string, to not select any flavor.

select_dbms_flavor()
  $sqldb->select_dbms_flavor( $flavor_name )
    

Reblesses the driver to a subclass based on the flavor name.

select_default_dbms_flavor()
  $sqldb->select_default_dbms_flavor( )
    

Calls select_dbms_flavor() with the result of default_dbms_flavor().

select_detect_dbms_flavor()
  $sqldb->select_detect_dbms_flavor( )
    

Calls select_dbms_flavor() with the result of detect_dbms_flavor() or default_dbms_flavor().

See DBIx::SQLEngine for the overall interface and developer documentation.

See DBIx::SQLEngine::Docs::ReadMe for general information about this distribution, including installation and license information.

2004-11-08 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.