DBIx::Class::TimeStamp man page on Pidora

Man page or keyword search:  
man Server   31170 pages
apropos Keyword Search (all sections)
Output format
Pidora logo
[printable version]

DBIx::Class::TimeStampUser Contributed Perl DocumentaDBIx::Class::TimeStamp(3)

NAME
       DBIx::Class::TimeStamp - DBIx::Class extension to update and create
       date and time based fields

DESCRIPTION
       Works in conjunction with InflateColumn::DateTime to automatically set
       update and create date and time based fields in a table.

SYNOPSIS
	package My::Schema;

	__PACKAGE__->load_components(qw( TimeStamp ... Core ));

	__PACKAGE__->add_columns(
	   id => { data_type => 'integer' },
	   t_created => { data_type => 'datetime', set_on_create => 1 },
	   t_updated => { data_type => 'datetime',
	       set_on_create => 1, set_on_update => 1 },
	);

       Now, any update or create actions will update the specified columns
       with the current time, using the DateTime inflator.

       This is effectively trigger emulation to get consistent behavior across
       databases that either implement them poorly or not at all.

METHODS
   get_timestamp
       Returns a DateTime object pointing to now.  Override this method if you
       have different time accounting functions, or want to do anything
       special.

       The date and time objects in the database are expected to be inflated.
       As such you can be pretty flexible with what you want to return here.

AUTHOR
       J. Shirley <jshirley@gmail.com>

CONTRIBUTORS
       Florian Ragwitz (Porting to DBIx::Class::DynamicDefault)

       LTJake/bricas

COPYRIGHT & LICENSE
       Copyright 2009 J. Shirley, all rights reserved.

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

perl v5.14.1			  2010-09-05	     DBIx::Class::TimeStamp(3)
[top]

List of man pages available for Pidora

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net