WeBWorK::DB::Database - DBI interface to SQL databases.
my $dbh = WeBWorK::DB::Database->new($source, $username, $password, %params);
Creates a DBI database connection. The $source
parameter should be a DBI data source, i.e., a DSN. The $username
and $password
parameters are the username and password required to access the database. The additional options passed via %params
may contain the database engine
and character_set
that will be used for all tables. If the database engine
is not provided, then the default value of "MYISAM" will be used. If the character_set
is not provided, then the default value of "latin1" will be used. If this database handle will be used for archiving or unarchiving courses then the additional options passed via %params
must also contain mysql_path
and mysqldump_path
. In addition debug => 1
may be set in %params
for development debugging purposes.