DBIx::Class::TimeStamp(3pm) User Contributed Perl Documentation DBIx::Class::TimeStamp(3pm)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.2 2010-09-05 DBIx::Class::TimeStamp(3pm)
Check Out this Related Man Page
DBIx::Class::KiokuDB(3pm) User Contributed Perl Documentation DBIx::Class::KiokuDB(3pm)NAME
DBIx::Class::KiokuDB - Refer to KiokuDB objects from DBIx::Class tables.
SYNOPSIS
See DBIx::Class::Schema::KiokuDB.
package MyApp::DB::Result::Album;
use base qw(DBIx::Class);
__PACKAGE__>load_components(qw(Core KiokuDB));
__PACKAGE__->table('album');
__PACKAGE__->add_columns(
id => { data_type => "integer" },
title => { data_type => "varchar" },
# the foreign key for the KiokuDB object:
metadata => { data_type => "varchar" },
);
__PACKAGE__->set_primary_key('id');
# enable a KiokuDB rel on the column:
__PACKAGE__->kiokudb_column('metadata');
DESCRIPTION
This DBIx::Class component provides the code necessary for DBIx::Class::Row objects to refer to KiokuDB objects stored in
KiokuDB::Backend::DBI.
CLASS METHODS
kiokudb_column $rel
Declares a relationship to any KiokuDB object.
In future versions adding relationships to different sub-collections will be possible as well.
METHODS
store
A convenience method that calls "store" in KiokuDB on all referenced KiokuDB objects, and then invokes "insert_or_update" on $self.
get_kiokudb_column $col
set_kiokudb_column $col, $obj
store_kiokudb_column $col, $obj
See DBIx::Class::Row.
OVERRIDDEN METHODS
new Recognizes objects passed in as column values, much like standard relationships do.
insert
Also calls "insert" in KiokuDB on all referenced objects that are not in the KiokuDB storage.
update
Adds a check to ensure that all referenced KiokuDB objects are in storage.
perl v5.12.4 2011-10-04 DBIx::Class::KiokuDB(3pm)
Hi all,
If I have 4 kind of files , and each file have different date, all of them are flat file and have the same 4 fields
Date|ID|Class|City
english.20060228.dat
02/28/2006|ABC|ENG|San Tomas
02/28/2006|BCD|ENG|San Jone
02/28/2006|AFD|ENG|San Luis
02/28/2006|ADD|ENG|San Mateo
... (3 Replies)
I just now read the doc in https://www.unix.com/tips-tutorials/35535-understanding-unix-timekeeping.html
Need clarification that half of the files in any directory is shown in below pattern in which time stamp pattern is highlighted
And half of the files are shown in different pattern... (2 Replies)
I have a couple of datetime fields in a file with contents like below:
ICPBR|6373056085|1|O||||JOHN|SMITH|||H200|706|445668|||123 SMITH ST|LAGRANGE|IL|66666 |||||||N|N|N|N|N|||345676|2009.02.20-13:09:04|257655957|2009.02.20-13:09:04||||N|||||F|||||||||||
I want to strip the time off the... (4 Replies)
Hi,
I 'd like to update the below highlighted values in a sample file based on the following table:
8283879A25918000000000005400000000000065629TTF3
8683884F40273000000000003900000000000047399TTF3
8883884FG0063000000000002600000000000031599TTF3... (7 Replies)
I have to create a user interface in which user can easily update ,delete or insert a new record which is pointing to a file in AIX Server?
Using awk,sed ican update ,modify the file.
how to create a link to userlike GUI(without using Tomcat,IIS) (3 Replies)
Hi All,
I have the following time stamp data in 2 columns
Date TimeStamp(also with milliseconds)
05/23/2012 08:30:11.250
05/23/2012 08:30:15.500
05/23/2012 08:31.15.500
.
.
etc
From this data I need the following output.
0.00( row1-row1 in seconds)
04.25( row2-row1 in... (5 Replies)
Hi,
is there a way to get unix time from timestamp using date function in unix/
OS: SunOS 5.10
input : 2012-07-26 15:00:00
output: 1343314800Thanks in advance (6 Replies)
I've got a job that finds and removes trace files based upon an access time of more than seven days (I've also tried a modify date).
find TABC* -atime +7 -exec rm +
find TABC* -mtime +7 -exec rm +
Whether I use -atime or -mtime, the process seems to work sporadically. Sometimes it removes... (6 Replies)
Hi,
ls -ltr
-rw-rw---- 1 user1 admins 5000032 Jan 20 17:11 M1120252_P004640.csv
Now i wish to cd to that folder amongst the below folders that would have log files for the date of the .csv file i.e. 20 Jan 17:11
ls -ltr
total 53616
drwxrwx--- 2 user1 admins 20840448 Jan 19... (4 Replies)
hi guys,
i need to update a date in my config file via shell file
M using this statement but it is not working ...any suggestions
cat $CONFIG_FILE | sed -e 's/START_RUN_DATE=$START_RUN_DATE/START_RUN_DATE=$NEW_END_DATE/g' > srap_config_new.txt (1 Reply)