jifty::dbi::record::cachable(3pm) [debian man page]
Jifty::DBI::Record::Cachable(3pm) User Contributed Perl Documentation Jifty::DBI::Record::Cachable(3pm)NAME
Jifty::DBI::Record::Cachable - records with caching behavior
SYNOPSIS
package Myrecord;
use base qw/Jifty::DBI::Record::Cachable/;
DESCRIPTION
This module subclasses the main Jifty::DBI::Record package to add a caching layer.
The public interface remains the same, except that records which have been loaded in the last few seconds may be reused by subsequent fetch
or load methods without retrieving them from the database.
METHODS
flush_cache
This class method flushes the _global_ Jifty::DBI::Record::Cachable cache. All caches are immediately expired.
_flush_key_cache
Blow away this record type's key cache
load_from_hash
Overrides the implementation from Jifty::DBI::Record to add caching.
load_by_cols
Overrides the implementation from Jifty::DBI::Record to add caching.
_cache_config
You can override this method to change the duration of the caching from the default of 5 seconds.
For example, to cache records for up to 30 seconds, add the following method to your class:
sub _cache_config {
{ 'cache_for_sec' => 30 }
}
AUTHOR
Matt Knopp <mhat@netlag.com>
SEE ALSO
Jifty::DBI, Jifty::DBI::Record
perl v5.14.2 2010-09-21 Jifty::DBI::Record::Cachable(3pm)
Check Out this Related Man Page
Jifty::Action::Record::Update(3pm) User Contributed Perl Documentation Jifty::Action::Record::Update(3pm)NAME
Jifty::Action::Record::Update - Automagic update action
DESCRIPTION
This class is used as the base class for Jifty::Actions that are merely updating Jifty::Record objects. To use it, subclass it and
override the "record_class" method to return the name of the Jifty::Record subclass that this action should update.
METHODS
arguments
Overrides the "arguments" in Jifty::Action::Record method to further specify that all of the primary keys must have values when submitted;
that is, they are constructors.
validate_arguments
We only need to validate arguments that got submitted -- thus, a mandatory argument that isn't submitted isn't invalid, as it's not going
to change the record. This is opposed to the behavior inherited from Jifty::Action, where mandatory arguments must be present for the
action to run.
However, constructor arguments are still required.
take_action
Overrides the virtual "take_action" method on Jifty::Action to call the appropriate "Jifty::Record"'s "set_" methods when the action is
run, thus updating the object in the database.
report_success
Sets the "message" in Jifty::Result to default success message, "Updated". Override this if you want to report some other more user-
friendly result.
possible_columns
Update actions do not provide fields for columns marked as "private" or "protected".
_extra_validator_args
Passes "for => 'update'" to validators.
_extra_canonicalizer_args
Passes "for => 'update'" to canonicalizers.
_extra_autocompleter_args
Passes "for => 'update'" to autocompleters.
SEE ALSO
Jifty::Action::Record, Jifty::Record
LICENSE
Jifty is Copyright 2005-2010 Best Practical Solutions, LLC. Jifty is distributed under the same terms as Perl itself.
perl v5.14.2 2011-02-10 Jifty::Action::Record::Update(3pm)
hi
i am facing a problem when i run a shell script to load a table.the error is
Record 1: Rejected - Error on table TRENDS."SHP_CUST_ORD_ITM".
ORA-14400: inserted partition key is beyond highest legal partition key
Record 2: Rejected - Error on table TRENDS."SHP_CUST_ORD_ITM", column... (4 Replies)
I have a file with contents as follows
Record 1: Rejected - Error on table "DWO"."P2G_CUST_EVENTS".
ORA-00001: unique constraint (DWO.CUST_EVENTS_PK) violated
Record 5: Rejected - Error on table "DWO"."P2G_CUST_EVENTS".
ORA-00001: unique constraint (DWO.CUST_EVENTS_PK) violated
Record 6:... (5 Replies)
I have a file that has 316 byte records. I would like to read in the file and combine Record#1 with Recod#2, Record #3 with Record #4, etc to create an output file with 632 byte records.
I was looking into using "awk" but I'm not sure if it will do what I need.
Any suggestions on a quick and... (4 Replies)
Hi all,
I've a flat file in this format:
=
"
Record 1
Field1 -> XXXX
Field2 -> 9558
Field3 -> 55AA
Record 2
Field1 -> YYYY
Field2 -> 12345
Field3 -> aa23
"
And i want to convert it to (4 Replies)
Below is an example of a file with some records... each record start with P1 till the next P1.
If I search for something like "4,4545:" then I want all the records with "4,4545:" to be removed from original file and copied to a temp file.
P1
1,123455654444
2,7126817361873
3,2134128282828... (5 Replies)
Dear All,
I have text file like this:
Header
Record 1
Record 2
.......
Record n
Tail
This line of code :
awk '{ if ( NR == 1 ) { head=substr($0,1,300);} else { last = substr($0,1,300);}END{printf "Header is : %-300s Trailer is : %-300s\n", head, last}' filename
converted Header... (11 Replies)
Hello Gurus,
We have a requirement to count the valid number of records in a comma delimited file with double quotes.
The catch here is..few records have a new line carriage within the double quotes,,say for ex:we have a file called accounts the record count is 4827..but the actual valid count... (5 Replies)
Hi,
I have a file that contains thousands of records. Each record starts with "New Record". I need to search this file based on a given value of "timestamp" and write all the records that match this timestamp into a new file.
I was able to locate the existence of a given value of timestamp using... (10 Replies)
I am trying to see if there is a way in awk to test the next record before processing.
All I am trying to do is see if the next line equal something then turn a flag off.
Example:
Problem
Cron
IneedThis
KeyOnThis
somemoredata
somemoredata
Cron
somemoredata
somemoredata
IneedThis... (7 Replies)
I want to keep only records contain length is 10 other records should remove from my original file without redirecting to other output file.
Source
1234567890
123456789011234
abcdefghil
Expected Result
1234567890
abcdefghil (9 Replies)
HI ,
I am having a huge comma delimiter file, I have to append the following four lines before the starting of the file through a shell script.
FILE NAME = TEST_LOAD
DATETIME = CURRENT DATE TIME
LOAD DATE = CURRENT DATE
RECORD COUNT = TOTAL RECORDS IN FILE
Source data
1,2,3,4,5,6,7... (7 Replies)
Hello!
Is there a way i can read a file with n records as one big string using linux shell script? I have a file in the below format -
REC1
REC2
REC3
.
.
.
REC4
Record length is 3000 bytes per record and with a newline char at the end. What i need to do is
- read this file as one... (5 Replies)
Hi,
The record length may be differ in afile. I want to display the records if the record length is not equal to 50 using sed/awk command.
Thanks in Advance (6 Replies)
When I check the length for the records in the file, it does not give me the correct value. I used wc -l command.
Example records:
abcdefghij
abcd\efghij
abcdefghi
Expected output is:
10
11
9
But the output returned is
10
10
9
Please help me on this issue. (10 Replies)
Hi,
I am currently writing a perl module that will be passed queries from other scripts and use DBI to execute them on an Oracle Database. The problem I have is when it comes to the return.
I am currently getting this from my code:
FIELDA FIELDB FIELDC ... (6 Replies)