Igor Zinovyev > Eve > Eve::PgSql

Download:
Eve-0.06.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Source  

NAME ^

Eve::PgSql - the PostgreSQL factory.

SYNOPSIS ^

    use Eve::PgSql;

    # Construct a factory instance
    my $pgsql = Eve::PgSql->new(
        database => $database,
        host => $host,
        port => $port,
        user => $user,
        password => $password,
        schema => $schema);

    # Create a function instance
    my $foo = $pgsql->get_function(
        name => 'foo',
        input_list => [
            {'bar' => $pgsql->get_bigint()},
            {'foo' => $pgsql->get_smallint()}],
        output_list => [
            {'baz' => $pgsql->get_text()},
            {'bam' => $pgsql->get_timestamp_with_timezome()}]);

DESCRIPTION ^

Eve::PgSql is a factory providing services to interact with PostgreSQL databases and common dependencies between these services.

Constructor arguments

database
host
port
user
password
schema

By default all arguments are undef so the database adapter will attempt to use standard PostgreSQL environment variables.

METHODS ^

init()

get_connection()

A PostgreSQL connection lazy loader service.

get_function()

A PostgreSQL stored function prototype service.

Arguments

name

a stored function name

input_list

an optional list of input parameters, each of which is specified as a structure like

    {'parameter_name' => $parameter_type}

where the $parameter_type is a Eve::PgSqlType derivative.

output_list

an optional list of output parameters specified, just like the input_list argument.

get_bigint()

A PostgreSQL bigint type lazy loader service.

get_boolean()

A PostgreSQL boolean type lazy loader service.

get_double()

A PostgreSQL double precision floating point type lazy loader service.

get_double_array()

A PostgreSQL double precision array type lazy loader service.

get_geometry()

A PostGIS geometry type lazy loader service.

get_integer()

A PostgreSQL integer type lazy loader service.

get_integer_array()

A PostgreSQL integer array type lazy loader service.

get_interval()

A PostgreSQL interval type lazy loader service.

get_smallint()

A PostgreSQL smallint type lazy loader service.

get_text()

A PostgreSQL text type lazy loader service.

get_timestamp_with_time_zone()

A PostgreSQL timestamp with time zone type lazy loader service.

get_timestamp_without_time_zone()

A PostgreSQL timestamp without time zone type lazy loader service.

get_array()

A PostgreSQL array type lazy loader service.

SEE ALSO ^

Eve::PgSqlConnection
Eve::PgSqlFunction
Eve::PgSqlType
Eve::PgSqlType::Array
Eve::PgSqlType::Bigint
Eve::PgSqlType::Integer
Eve::PgSqlType::Interval
Eve::PgSqlType::Smallint
Eve::PgSqlType::Text
Eve::PgSqlType::TimestampWithTimeZone

LICENSE AND COPYRIGHT ^

Copyright 2012 Igor Zinovyev.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.

AUTHOR ^

Sergey Konoplev
Igor Zinovyev
syntax highlighting: