NAME

DBD::Ingres - Ingres access interface for Perl5

SYNOPSIS

$dbh = DBI->connect($dbname, $user, $options, 'Ingres')
$sth = $dbh->prepare($statement)
$sth->execute
@row = $sth->fetchrow
$sth->finish
$dbh->commit
$dbh->rollback
$dbh->disconnect
and many more

DESCRIPTION

DBD::Ingres is an extension to Perl which allows access to Ingres databases. It is built on top of the standard DBI extension an implements the methods that DBI require.

This document describes the differences between the "generic" DBD and DBD::Ingres.

Not implemented

state
$h->state                (undef)

SQLSTATE is not implemented yet. It is planned for the (not so) near future.

ping
$dbh->ping;

Not yet implemented - on the ToDo list.

OpenIngres new features

The new features of OpenIngres are not (yet) supported in DBD::Ingres.

This includes BLOBS, decimal datatype and spatial datatypes.

Support will be added when the need arises - if you need it you add it ;-)

Extensions/Changes

connect
connect(dbi:Ingres:dbname[;options] [, user [, password]])

Options to the connection are passed in the datasource argument. This argument should contain the database name possibly followed by a semicolon and the database options.

Options must be given exactly as they would be given an ESQL-connect statement, ie. separated by blanks.

The connect call will result in a connect statement like:

CONNECT dbname IDENTIFIED BY user PASSWORD password OPTIONS=options

Eg.

local database
connect("mydb", "me", "mypassword")
with options and no password
connect("mydb;-Rmyrole/myrolepassword", "me")
Ingres/Net database
connect("thatnode::thisdb;-xw -l", "him", "hispassword")
=back

and so on.

do
$dbh-E<gt>do

This is implemented as a call to 'EXECUTE IMMEDIATE' with all the limitations that this implies.

Placeholders and binding is not supported with $dbh->do.

ing_statement
$sth->{ing_statement}             ($)

Contains the text of the SQL-statement. Used mainly for debugging.

ing_types
$sth->{ing_types}              (\@)

Returns an array of the "perl"-type of the return fields of a select statement.

The types are represented as:

'i': integer

All integer types, ie. int1, int2 and int4.

These values are returned as integers. This should not cause loss of precision as the internal Perl integer is at least 32 bit long.

'f': float

The types float, float8 and money.

These values are returned as floating-point numbers. This may cause loss of precision, but that would occur anyway whenever an application referred to the data (all Ingres tools fetch these values as floating-point numbers)

's': string

All other supported types, ie. char, varchar, text, date etc.

ing_lengths
$sth->{ing_lengths}              (\@)

Returns an array containing the lengths of the fields in Ingres, eg. an int2 will return 2, a varchar(7) 7 and so on.

Note that money and date will have length returned as 0.

ing_types
$sth->{ing_sqltypes}              (\@)

Returns an array containing the Ingres types of the fields. The types are given as documented in the Ingres SQL Reference Manual.

NOTES

I wonder if I have forgotten something?

SEE ALSO

The DBI documentation (at the end of DBI.pm).

AUTHORS

DBI/DBD was developed by Tim Bunce, <Tim.Bunce@ig.co.uk>, who also developed the DBD::Oracle that is the closest we have to a generic DBD implementation.

Henrik Tougaard, <ht@datani.dk> developed the DBD::Ingres extension.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 273:

You forgot a '=back' before '=head1'