Name : perl-DBD-PgLite
| |
Version : 0.11
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : lp154.8.1
| Date : 2023-01-27 16:17:47
|
Group : Development/Libraries/Perl
| Source RPM : perl-DBD-PgLite-0.11-lp154.8.1.src.rpm
|
Size : 0.13 MB
| |
Packager : https://www_suse_com/
| |
Summary : PostgreSQL emulation mode for SQLite
|
Description :
The module automatically and transparently transforms a broad range of SQL statements typical of PostgreSQL into a form suitable for use in SQLite. This involves both (a) parsing and filtering of the SQL; and (b) the addition of several PostgreSQL-compatible functions to SQLite.
Mainly because of datatype issues, support for many PostgreSQL features simply cannot be provided without elaborate planning and detailed metadata. Since this module is intended to be usable with any SQLite3 database, it follows that the emulation is limited in several respects. An overview of what works and what doesn\'t is given in the following section on PostgreSQL Compatibility.
DBD::PgLite has support of a sort for stored procedures. This is described in the Extras section below. So are the few database functions defined by this module which are not in PostgreSQL. Finally, the Extras section contains a brief mention of the DBD::PgLite::MirrorPgToSQLite companion module.
If you do not want SQL filtering to be turned on by default for the entire session, you can connect setting the connection attribute _FilterSQL_ to a false value:
my $dbh = DBI->connect(\"dbi:PgLite:dbname=$fn\", undef, undef, {FilterSQL=>0});
To turn filtering off (or on) for a single statement, you can specify _FilterSQL_ option as a statement attribute, e.g.:
$dbh->do($sql, {FilterSQL=>0}, AATTbind); my $sth = $dbh->prepare($sql, {FilterSQL=>0}); $res = $dbh->selectall_arrayref($sql, {FilterSQL=>0}, AATTbind);
It is possible to specify user-defined pre- and postfiltering routines, both globally (by specifying them as attributes of the database handle) and locally (by specifying them as statement attributes):
$dbh = DBI->connect(\"dbi:PgLite:$file\",undef,undef, {prefilter=>\\&prefilter}); $res = $dbh->selectall_arrayref($sql, {postfilter=>\\&postfilter}, AATTbind_values);
The pre-/postfiltering subroutine receives the SQL as parameter and is expected to return the changed SQL.
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-D/15.4/noarch |