DBD::PrimeBase - PrimeBase database server driver for DBI
use DBI; $dbh = DBI->connect('dbi:PrimeBase:Server=$SName;Address=$IPNUM;Database=$DBName', 'user', 'password'); where: $SName is the PrimeBase server name, for example "PrimeServer". $IPNUM is the IP address of the machine on which the PrimeBase server is running. Default "localhost" $DBName is the name of the database to be connected to.
See DBI for more information.
The PrimeBase Driver for DBI was created by taking the ODBC driver and converting it so that it used the PrimeBase API instead of ODBC. The Oracle and mysql DBDs were also used as a reference while doing this.
This is a first pass at the PrimeBase DBD and it is hoped that it will be enough to introduce PrimeBase to the Perl community. If you find bugs or missing features please report them to support@PrimeBase.com or mention them in the PrimeBase talk mail list where they will be looked at and fixed. To subscribe to the PrimeBase talk mail list send mail to : PrimeBase-Talk-on@lists.imd.net
$rc = $drh->func("createdb", $dbname, [host, user, password,], 'admin'); $rc = $drh->func("dropdb", $dbname, [host, user, password,], 'admin');
Creates the database $dbname if it doesn't already exist.
Drops the database $dbname.
It should be noted that database deletion is not prompted for in any way. Nor is it undo-able.
Once you drop the database, the database and all data in it will be gone!
This method should be used at your own risk.
The DBD::PrimeBase driver supports the following attributes of database handles :
Starts a transaction.
Commits changes made in the transaction.
Undo changes made in the transaction.
Each statement is treated as a separate transaction which is committed automatically on successful completion. This also has the effect of committing any previous transaction.
The format for string representations of date data. For example "MM/DD/YYYY".
Please refer to the "PrimeBase Talk User Guide" under $datefmt for more information.
The format for string representations of time data. For example "HH:MM:SS:hu".
Please refer to the "PrimeBase Talk User Guide" under $timefmt for more information.
The format for string representations of datetime data. For example "MM/DD/YYYY HH:MM:SS".
Please refer to the "PrimeBase Talk User Guide" under $tsfmt for more information.
Activates the API logging in the PrimeBase virtual machine. This can be useful in debugging or reporting problems.
Set the name of the log file to use for API logging.
Activates tracing in the PrimeBase DBD. Output will be written to the file 'DBDTrace.log' in the current working directory. This can be useful in debugging or reporting problems.
The DBD::PrimeBase driver supports the following standard attributes of statement handles :
Please refer to the DBI documentation for a description of these attributes.
Thanks to all the people who created the original ODBC, Mysql, and Oracle DBDs.
2 POD Errors
The following errors were encountered while parsing the POD:
'=item' outside of any '=over'
You forgot a '=back' before '=head2'
To install DBD::PrimeBase, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DBD::PrimeBase
CPAN shell
perl -MCPAN -e shell install DBD::PrimeBase
For more information on module installation, please visit the detailed CPAN module installation guide.