DBIx::Class::InflateColumn::DT - Inflate DBIx::Class columns to DT objects
package Foo::Schema::Result::Bar; use base 'DBIx::Class::Core'; __PACKAGE__->load_components('InflateColumn::DT'); __PACKAGE__->table('bars'); __PACKAGE__->add_columns( consumed => { data_type => "timestamp with time zone", default_value => \"current_timestamp", is_nullable => 0, }, ... );
This module is a tiny wrapper around DBIx::Class::InflateColumn::DateTime that does literally one thing: reblesses inflated DateTime objects into DT objects.
This is to allow working with database timestamp column values without the need for lots of boilerplate just to compare them with current time.
timestamp
To install this module type the following:
perl Makefile.PL make && make test && make install
DBIx::Class::InflateColumn::DateTime is the parent for this class, and DT is the result.
No doubt there are some. Please post an issue on GitHub (see below) if you find something. Pull requests are also welcome.
GitHub repository: https://github.com/nohuhu/DBIx-Class-InflateColumn-DT
Copyright (c) 2018 by Alex Tokarev <nohuhu@cpan.org>.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See "perlartistic".
To install DBIx::Class::InflateColumn::DT, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DBIx::Class::InflateColumn::DT
CPAN shell
perl -MCPAN -e shell install DBIx::Class::InflateColumn::DT
For more information on module installation, please visit the detailed CPAN module installation guide.