Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
DBIx::Skinny::InflateCUsernContributedDPIx::Skinny::InflateColumn::DateTime(3)

NAME
       DBIx::Skinny::InflateColumn::DateTime - DateTime	inflate/deflate
       settings	for DBIx::Skinny

SYNOPSIS
       Use this	module in your schema.

	 package Your::DB::Schema;
	 use DBIx::Skinny::Schema;
	 use DBIx::Skinny::InflateColumn::DateTime;

	 install_table table1 => {
	     pk	'id';
	     columns qw/id name	created_at updated_at/;
	 };

	 install_table table2 => {
	     pk	'id';
	     columns qw/id name	booked_on created_on updated_on/;
	 };

       In your app.

	 my $row = Your::DB->single('table1', {	id => 1	});
	 print $row->created_at->ymd;  # created_at is DateTime	object

DESCRIPTION
       DBIx::Skinny::InflateColumn::DateTime provides inflate/deflate settings
       for *_at/*_on columns.

       If you want to set created_XX and updated_XX automatically, you can use
       DBIx::Class::InflateColumn::DateTime::Auto.

INFLATE/DEFLATE
       This module installs inflate rule for /_(at|on)$/ columns.

       That columns will be inflated as	DateTime objects.

OPTIONS
   time_zone
       default time_zone is 'local'.

       set this	option if you decide other time_zone.

       Example:

	 use DBIx::Skinny::InflateColumn::DateTime (time_zone => DateTime::TimeZone->new(name => 'Asia/Tokyo'));

   rules
       default rules is	[qr/^.+_at$/, qr/^.+_on$/].

       set this	option if you decide other rules.

       Example:

	 use DBIx::Skinny::InflateColumn::DateTime (rules => [qr/^created$/, qr/^updated$/]);

SEE ALSO
       DBIx::Skinny, DBIx::Class::InflateColumn::DateTime

AUTHOR
       Ryo Miyake  "<ryo.studiom __at__	gmail.com>"

SPECIAL	THANKS
       nihen : Masahiro	Chiba

LICENSE
       This library is free software; you can redistribute it and/or modify it
       under the same terms as Perl itself.

perl v5.32.1			  2010DBIx::Skinny::InflateColumn::DateTime(3)

NAME | SYNOPSIS | DESCRIPTION | INFLATE/DEFLATE | OPTIONS | SEE ALSO | AUTHOR | SPECIAL THANKS | LICENSE

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=DBIx::Skinny::InflateColumn::DateTime&sektion=3&manpath=FreeBSD+13.0-RELEASE+and+Ports>

home | help