DBX - Perl extension to simplify and enhance the DBI with minimal overhead


NAME

DBX - Perl extension to simplify and enhance the DBI with minimal overhead


SYNOPSIS

  use DBX;
  $conn = DBX->mysql("database=test;host=localhost;", "", "");
  $rs = $conn->query("SELECT * FROM test");
  while($rs)
  {
        print $rs->field("client") . "\n";
        $rs->field("client", "test");
        $rs->move_next;
  }


ABSTRACT

  Abstracts the DBI by providing easy-to-use wrappers.


DESCRIPTION

The DBX family of modules provides a layer of abstraction over the DBI. The DBX provides a simple cursor system, and a simple field retrieval and updating system.

The DBX module exports no subroutines. To connect to a data source, use the following code:

  use DBX;
  my $conn = DBX->mysql("database=test;host=localhost;", "", "");

Simply replace mysql with the name of the DBD driver you want to use. You should not include ``dbi:mysql:'' in the connection string; DBX specifies this automatically.

In the above code, $conn is a the DBX::Connection manpage object, which can be used to issue queries on the data source. DBX queries are handled by the DBX::Recordset manpage.


DEPENDENCIES

Requires the the DBI manpage module and appropriate DBD drivers.


TODO

Random-access cursors
delete and add functions
Better error-handling
Query caching


SEE ALSO

the DBI manpage, the DBX::Recordset manpage, the DBX::Connection manpage


AUTHOR

Bill Atkins, <dbxNOSPAM@batkins.com>


COPYRIGHT AND LICENSE

Copyright 2003 by Bill Atkins

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

 DBX - Perl extension to simplify and enhance the DBI with minimal overhead