NAME
DBIx::PgLink::Connector - glue between Adapter, Accessors and PL/Perl
SYNOPSIS
See DBIx::PgLink
ATTRIBUTES
- conn_name
-
Connection name (dbix_pglink.connections.conn_name).
- adapter
-
Instance of DBIx::PgLink::Adapter class.
METHODS
new
-
Create new instance of Adapter class, load settings from PostgreSQL tables in dbix_pglink schema, and immediately connect to datasource.
build_accessors
-
$connector->build_accessors( local_schema => $local_schema, remote_catalog => $remote_catalog, remote_schema => $remote_schema, remote_object => $remote_object, remote_object_type => \@types, );
Enumerates database objects of remote database, and build local accessors in specified
local_schema
.Can accept like-pattern of remote catalog, schema and object names.
Local schema created automatically if not exists. Building methods must be reenterable and must drop old object before creating new one.
Implemented with
DBIx::PgLink::Accessor
role. remote_query
-
In PL/Perl function $connector->remote_query($query); $connector->remote_query($query, $param_values); $connector->remote_query($query, $param_values, $param_types);
Execute set-returning SQL $query in remote database and returns dataset as result of PL/Perl PostgreSQL function. Query can by parametrized and $param_values binded. Parameter values and types is function input parameters of TEXT[] type. Parameter type can be specified as 'SQL_FLOAT' or 'FLOAT' or integer type code. See "DBI Constants" in DBI.
Implemented with
DBIx::PgLink::RemoteAction
role. remote_exec
-
In PL/Perl function $connector->remote_exec($query); $connector->remote_exec($query, $param_values); $connector->remote_exec($query, $param_values, $param_types);
The same as
remote_query
but returns only number of proceeded rows. Ignore any resultset returned.Implemented with
DBIx::PgLink::RemoteAction
role.
SEE ALSO
DBI, DBIx::PgLink DBIx::PgLink::Adapter DBIx::PgLink::Accessor::Tables
AUTHOR
Alexey Sharafutdinov <alexey.s.v.br@gmail.com>
COPYRIGHT AND LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.