DBIx:: | |
DBIx:: | A StORM class representing a database connection. |
Variables | |
$VERSION (public static) | The version of this package. |
$DEBUG (public static) | Causes DBIx::StORM to emit debug messages if set to a true value. |
Functions | |
connect (public static) | Create a new DBIx::StORM object and open a connection to the database using DBI. |
connect_cached (public static) | Create a new DBIx::StORM object using connection to the database using DBI. |
_wrap_handle (private static) | Create a new DBIx::StORM object from an existing DBI handle. |
Variables | |
$drivername | |
Functions | |
inflater (public instance) | Add an inflater to the inflation chain for this connection. |
_inflaters (private instance) | Returns all the inflaters registered on this connection. |
get (public instance) | Fetch a table object using this database connection. |
_as_tied_hash (private instance) | Fetch a tied hash map of table name to DBIx::StORM::Table objects. |
dbi (public instance) | Fetch the underlying DBI database handle. |
add_hint (public instance) | Add a hint to the key parsing system. |
_debug (private static/ | Write a debugging message to STDERR if the debug level is high enough to warrant showing this message. |
_sqldriver (private instance) | Fetch the database driver used to perform database-specific functions and optimisations for this connection. |
TIEHASH (private static) | Create a new tied hash of StORM Table objects available on this handle. |
FETCH (private instance) | Fetch a table object for a particular table in the hash |
EXISTS (private instance) | Check for the existence of a table on a particular connection. |
FIRSTKEY (private instance) | Reset the iterator and return the first hash object. |
NEXTKEY (private instance) | Return the next table from the iterator. |
SCALAR (private instance) | Return the number of tables available on the connection. |
A StORM class representing a database connection.
This is essentially a wrapper for a DBI connection. This object can be dereferenced as a hash, with the keys of the hash being the table names present in this database and the values being DBIx::StORM::Table objects.
=end NaturalDocs
Variables | |
$VERSION (public static) | The version of this package. |
$DEBUG (public static) | Causes DBIx::StORM to emit debug messages if set to a true value. |
Functions | |
connect (public static) | Create a new DBIx::StORM object and open a connection to the database using DBI. |
connect_cached (public static) | Create a new DBIx::StORM object using connection to the database using DBI. |
_wrap_handle (private static) | Create a new DBIx::StORM object from an existing DBI handle. |
Variables | |
$drivername | |
Functions | |
inflater (public instance) | Add an inflater to the inflation chain for this connection. |
_inflaters (private instance) | Returns all the inflaters registered on this connection. |
get (public instance) | Fetch a table object using this database connection. |
_as_tied_hash (private instance) | Fetch a tied hash map of table name to DBIx::StORM::Table objects. |
dbi (public instance) | Fetch the underlying DBI database handle. |
add_hint (public instance) | Add a hint to the key parsing system. |
_debug (private static/ | Write a debugging message to STDERR if the debug level is high enough to warrant showing this message. |
_sqldriver (private instance) | Fetch the database driver used to perform database-specific functions and optimisations for this connection. |
TIEHASH (private static) | Create a new tied hash of StORM Table objects available on this handle. |
FETCH (private instance) | Fetch a table object for a particular table in the hash |
EXISTS (private instance) | Check for the existence of a table on a particular connection. |
FIRSTKEY (private instance) | Reset the iterator and return the first hash object. |
NEXTKEY (private instance) | Return the next table from the iterator. |
SCALAR (private instance) | Return the number of tables available on the connection. |
sub connect
Create a new DBIx::StORM object and open a connection to the database using DBI. All of the parameters are passed to DBI untouched.
String $dsn | The DBI DSN string or a DBI::db object |
String $user | Database username (if $dsn is a string) |
String $password | Database password (if $dsn is a string) |
Object | A new DBIx::StORM object |
=end NaturalDocs
sub connect_cached
Create a new DBIx::StORM object using connection to the database using DBI. If there is already an open connection to the database requested then it will be reused, otherwise a new connection will be established. All of the parameters are passed to DBI untouched.
String $dsn | The DBI DSN string or a DBI::db object |
String $user | Database username (if $dsn is a string) |
String $password | Database password (if $dsn is a string) |
Object | A new DBIx::StORM object |
=end NaturalDocs
sub _wrap_handle
Create a new DBIx::StORM object from an existing DBI handle.
This is used by the constructors connect() and connect_cached() to make a fully-fledged StORM handle.
Object $dbi | An instance of DBI::dbh to wrap |
Object | A new DBIx::StORM object, using $dbi for database access |
=end NaturalDocs
sub add_hint
Add a hint to the key parsing system.
String $hint_type | a string describing the type of hint |
String $hint_value | the hint itself. The format depends on the <$hint_type> |
Nothing
=end NaturalDocs
sub _debug
Write a debugging message to STDERR if the debug level is high enough to warrant showing this message.
Integer $level | an integer showing the level of this message. A higher number means the message is less likely to be shown |
List @messages | The message string(s) to be written to STDERR |
Nothing
=end NaturalDocs
sub _sqldriver
Fetch the database driver used to perform database-specific functions and optimisations for this connection. This is used internally for other objects to be able to directly invoke database calls.
None
Object | an instance of DBIx::StORM::SQLDriver |
=end NaturalDocs
The version of this package.
our $VERSION
Causes DBIx::StORM to emit debug messages if set to a true value.
our $DEBUG
Create a new DBIx::StORM object and open a connection to the database using DBI.
sub connect
Create a new DBIx::StORM object using connection to the database using DBI.
sub connect_cached
Create a new DBIx::StORM object from an existing DBI handle.
sub _wrap_handle
my $drivername
Add an inflater to the inflation chain for this connection.
sub inflater
Returns all the inflaters registered on this connection.
sub _inflaters
Fetch a table object using this database connection.
sub get
Fetch a tied hash map of table name to DBIx::StORM::Table objects.
sub _as_tied_hash
Fetch the underlying DBI database handle.
sub dbi
Add a hint to the key parsing system.
sub add_hint
Write a debugging message to STDERR if the debug level is high enough to warrant showing this message.
sub _debug
Fetch the database driver used to perform database-specific functions and optimisations for this connection.
sub _sqldriver
Create a new tied hash of StORM Table objects available on this handle.
sub TIEHASH
Fetch a table object for a particular table in the hash
sub FETCH
Check for the existence of a table on a particular connection.
sub EXISTS
Reset the iterator and return the first hash object.
sub FIRSTKEY
Return the next table from the iterator.
sub NEXTKEY
Return the number of tables available on the connection.
sub SCALAR