GX::Database::MySQL - MySQL database component
package MyApp::Database::Default; use GX::Database::MySQL; __PACKAGE__->setup( database => 'myapp', host => '127.0.0.1', user => 'jau', password => '12345' ); 1;
This module provides the GX::Database::MySQL class which extends the GX::Database class.
new
Returns the database component instance.
$database = $database_class->new;
$database ( GX::Database::MySQL object )
$database
GX::Exception
All public methods can be called both as instance and class methods.
connect
See GX::Database.
connect_options
dbh
disconnect
dsn
is_connected
password
Returns the password that is used for connecting to the database.
$password = $database->password;
$password ( string | undef )
$password
undef
setup
Sets up the database component.
$database_class->setup( %options );
connect_options ( HASH reference )
HASH
A reference to a hash with additional options to pass to DBI's connect() method.
connect()
database ( string )
database
The name of the database. Required unless dsn is specified.
driver_options ( string )
driver_options
Additional driver-specific options that should be appended to the auto-generated data source name (DSN), e.g. "mysql_compression=1".
dsn ( string )
The full DBI data source name (DSN) that is used for connecting to the database. Overrides all other DSN related options if specified.
host ( string )
host
The hostname of the MySQL server.
password ( string )
The password that is used for connecting to the database.
port ( integer )
port
The port number on which the MySQL server is running.
sql_builder ( GX::SQL::Builder object )
sql_builder
The associated SQL builder. Defaults to a GX::SQL::Builder::MySQL instance.
user ( string )
user
The username that is used for connecting to the database.
Returns the user name that is used for connecting to the database.
$user = $database->user;
$user ( string | undef )
$user
DBD::mysql
Jörg A. Uzarek <uzarek@runlevelnull.de>
Copyright (c) 2009-2011 Jörg A. Uzarek.
This module is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License Version 3 as published by the Free Software Foundation.
To install GX, copy and paste the appropriate command in to your terminal.
cpanm
cpanm GX
CPAN shell
perl -MCPAN -e shell install GX
For more information on module installation, please visit the detailed CPAN module installation guide.