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
- Binding
-
Parameter binding is not implented is this version of DBD::Ingres. It is planned for a future release - but does not have high priority. Any takers?
As there is no binding, there is no need for reexecution of statements - not that anything in the code prevents it - to my knowledge :-)
- 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
- AutoCommit
-
$dbh-E<gt>{AutoCommit} ($)
Defaults to OFF. The DBI spec specifies that it should be ON, but the default mode for other Ingres tools is AutoCommit OFF and that should be followed here.
Any objections?
- ChopBlanks
-
$h->{ChopBlanks} ($)
Defaults to !$h->{CompatMode} (true normally, false for Ingperl emulation) - again not quite according to the DBI-spec, but doing the "right" thing for Ingres.
- do
-
$dbh-E<gt>do
This is implemented as a call to 'EXECUTE IMMEDIATE' with all the limitations that this implies.
This may change when binds are added.
- statement
-
$sth->{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.