Barry Leslie > DBD-PrimeBase-1.4003 > DBD::PrimeBase

Download:
DBD-PrimeBase-1.4003.tar.gz

Dependencies

Annotate this POD

Related Modules

Apache::PerlRun
Apache::Registry
Net::SMTP
Net::FTP
CGI::Session
MIME::Lite
more...
By perlmonks.org
View/Report Bugs
Module Version: 1.4003   Source  

NAME ^

DBD::PrimeBase - PrimeBase database server driver for DBI

SYNOPSIS ^

  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.

DESCRIPTION ^

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

Server Administration

admin
    $rc = $drh->func("createdb", $dbname, [host, user, password,], 'admin');
    $rc = $drh->func("dropdb", $dbname, [host, user, password,], 'admin');
createdb

Creates the database $dbname if it doesn't already exist.

dropdb

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.

DATABASE HANDLES ^

The DBD::PrimeBase driver supports the following attributes of database handles :

Transaction Handling
$dbh->{AutoCommit} = 0;

Starts a transaction.

$dbh->commit;

Commits changes made in the transaction.

$dbh->rollback;

Undo changes made in the transaction.

$dbh->{AutoCommit} = 1;

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.

NON STANDARD DATABASE HANDLES ATTRIBUTES

pb_datefmt (string, read/write)

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.

pb_timefmt (string, read/write)

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.

pb_datetimefmt (string, read/write)

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.

pb_tracing (bool, write)

Activates the API logging in the PrimeBase virtual machine. This can be useful in debugging or reporting problems.

pb_tracelog (string, write)

Set the name of the log file to use for API logging.

pb_dbd_tracing (string, write)

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.

STATEMENT HANDLES ^

The DBD::PrimeBase driver supports the following standard attributes of statement handles :

ChopBlanks
LongReadLen
LongTruncOk
NUM_OF_PARAMS
NUM_OF_FIELDS
NAME
CursorName
TYPE
PRECISION
SCALE

Please refer to the DBI documentation for a description of these attributes.

ACKNOWLEDGEMENTS ^

Thanks to all the people who created the original ODBC, Mysql, and Oracle DBDs.

syntax highlighting: