1 package FS::table_name;
6 #use FS::UID qw(getotaker);
7 use FS::Record qw(hfields qsearch qsearchs);
13 FS::table_name - Object methods for table_name records
19 $record = create FS::table_name \%hash;
20 $record = create FS::table_name { 'column' => 'value' };
22 $error = $record->insert;
24 $error = $new_record->replace($old_record);
26 $error = $record->delete;
28 $error = $record->check;
32 An FS::table_name object represents an example. FS::table_name inherits from
33 FS::Record. The following fields are currently supported:
37 =item field - description
47 Creates a new example. To add the example to the database, see L<"insert">.
49 Note that this stores the hash reference, not a distinct copy of the hash it
50 points to. You can ask the object for a copy with the I<hash> method.
55 my($proto,$hashref)=@_;
57 $proto->new('table_name',$hashref);
63 Adds this record to the database. If there is an error, returns the error,
64 otherwise returns false.
71 #local $SIG{HUP} = 'IGNORE';
72 #local $SIG{INT} = 'IGNORE';
73 #local $SIG{QUIT} = 'IGNORE';
74 #local $SIG{TERM} = 'IGNORE';
75 #local $SIG{TSTP} = 'IGNORE';
84 Delete this record from the database.
94 =item replace OLD_RECORD
96 Replaces the OLD_RECORD with this one in the database. If there is an error,
97 returns the error, otherwise returns false.
103 return "(Old) Not a table_name record!" unless $old->table eq "table_name";
105 return "Can't change keyfield!"
106 unless $old->getfield('keyfield') eq $new->getfield('keyfield');
115 Checks all fields to make sure this is a valid example. If there is
116 an error, returns the error, otherwise returns false. Called by the insert
123 return "Not a table_name record!" unless $self->table eq "table_name";
131 The author forgot to customize this manpage.
139 ivan@voicenet.com 97-jul-1
142 ivan@sisd.com 97-nov-13
144 $Log: table_template.pm,v $
145 Revision 1.2 1998-11-15 03:48:49 ivan
146 update for current version