Tao::DBI::db - DBI connection with portable support for named placeholders in statements


Tao-DBI documentation  | view source Contained in the Tao-DBI distribution.

Index


NAME

Top

Tao::DBI::db - DBI connection with portable support for named placeholders in statements

SYNOPSIS

Top

  use Tao::DBI qw(dbi_connect dbi_prepare);

  $dbh = dbi_connect($args);
  $sql = q{UPDATE T set a = :a, b = :b where k = :k};
  $stmt = $dbh->prepare($sql);
  $rc = $stmt->execute({ k => $k, a => $a, b => $b });

  # dbi_prepare() can also be used to create Tao::DBI::st
  $stmt = dbi_prepare($sql, { dbh => $dbh });




DESCRIPTION

Top

new
  $dbh = DBI::db::new($args)

Note. Unless $args has an explicit pair at key "FetchHashKeyName", the connection uses "FetchHashKeyName" = 'NAME_lc'> which forces the keys in fetchrow_arrayref to come in lower case.

Note. Unless $args has an explicit pair at key "AutoCommit", the connection uses "AutoCommit" = 0> which means you have to commit or rollback explicitly.

execute
  $sth->execute($hash);
  $sth->execute($param);
  $sth->execute;

Returns

EXPORT

Nothing to be exported. Every method is available as a method.

BUGS

Top

Please report bugs via CPAN RT http://rt.cpan.org/NoAuth/Bugs.html?Dist=Tao-DBI.

AUTHOR

Top

Adriano R. Ferreira, <ferreira@cpan.org>

COPYRIGHT AND LICENSE

Top


Tao-DBI documentation  | view source Contained in the Tao-DBI distribution.