Difference between revisions of "Freeside:1.7:Documentation:Developer/FS/h Common"

From Freeside
Jump to: navigation, search
(import from POD)
 
(import from POD)
 
Line 14: Line 14:
 
==METHODS==
 
==METHODS==
 
; sql_h_search END_TIMESTAMP [ START_TIMESTAMP ]
 
; sql_h_search END_TIMESTAMP [ START_TIMESTAMP ]
:Returns an a list consisting of the "SELECT" and "EXTRA_SQL" SQL fragments to search for the appropriate history records created before END_TIMESTAMP and (optionally) not cancelled before START_TIMESTAMP.
+
:Returns an a list consisting of the "SELECT", "EXTRA_SQL", SQL fragments, a placeholder for "CACHE_OBJ" and an "AS" SQL fragment, to search for the appropriate history records created before END_TIMESTAMP and (optionally) not deleted before START_TIMESTAMP.
 
; sql_h_searchs END_TIMESTAMP [ START_TIMESTAMP ]
 
; sql_h_searchs END_TIMESTAMP [ START_TIMESTAMP ]
 
:Like sql_h_search, but limited to the single most recent record (before END_TIMESTAMP)
 
:Like sql_h_search, but limited to the single most recent record (before END_TIMESTAMP)

Latest revision as of 20:05, 18 February 2008

NAME

FS::h_Common - History table "mixin" common base class

SYNOPSIS

package FS::h_tablename; @ISA = qw( FS::h_Common FS::tablename );

sub table { 'h_table_name'; }

sub insert { return "can't insert history records manually"; } sub delete { return "can't delete history records"; } sub replace { return "can't modify history records"; }

DESCRIPTION

FS::h_Common is intended as a "mixin" base class for history table classes to inherit from.

METHODS

sql_h_search END_TIMESTAMP [ START_TIMESTAMP ]
Returns an a list consisting of the "SELECT", "EXTRA_SQL", SQL fragments, a placeholder for "CACHE_OBJ" and an "AS" SQL fragment, to search for the appropriate history records created before END_TIMESTAMP and (optionally) not deleted before START_TIMESTAMP.
sql_h_searchs END_TIMESTAMP [ START_TIMESTAMP ]
Like sql_h_search, but limited to the single most recent record (before END_TIMESTAMP)

BUGS

SEE ALSO

FS::Record, schema.html from the base documentation