Igor Zinovyev > Eve > Eve::PgSqlType::Timestamp

Download:
Eve-0.06.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Source  

NAME ^

Eve::PgSqlType::Timestamp - a PostgreSQL timestamp without timezone type.

SYNOPSIS ^

    my $bigint = Eve::PgSqlType::Timestamp->new();
    $bigint->serialize(value => $datetime);

DESCRIPTION ^

Eve::PgSqlType::Timestamp is a PostgreSQL timestamp without time zone type adapter class.

METHODS ^

get_type()

Returns

The PG_TIMESTAMP type.

wrap()

Wraps an expression with CAST statement.

Arguments

expression

Returns

CAST (expression AS timestamp without time zone)

serialize()

Formats a DateTime object into the appropriate string timestamp without timezone representation with the DateTime::Format::Pg module.

Arguments

value

Returns

The string like '2011-03-21 20:41:34.123456'.

deserialize()

Parses a timestamp without time zone string representation into the appropriate DateTime object with the DateTime::Format::Pg module.

Arguments

value

Returns

A DateTime object.

SEE ALSO ^

DateTime
DateTime::Format::Pg
DBD::Pg
Eve::PgSqlType

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: