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';
83 Delete this record from the database.
93 =item replace OLD_RECORD
95 Replaces the OLD_RECORD with this one in the database. If there is an error,
96 returns the error, otherwise returns false.
102 return "(Old) Not a table_name record!" unless $old->table eq "table_name";
104 return "Can't change keyfield!"
105 unless $old->getfield('keyfield') eq $new->getfield('keyfield');
114 Checks all fields to make sure this is a valid example. If there is
115 an error, returns the error, otherwise returns false. Called by the insert
122 return "Not a table_name record!" unless $self->table eq "table_name";
132 $Id: table_template.pm,v 1.3 1998-11-15 04:33:00 ivan Exp $
136 The author forgot to customize this manpage.
144 ivan@voicenet.com 97-jul-1
147 ivan@sisd.com 97-nov-13
149 $Log: table_template.pm,v $
150 Revision 1.3 1998-11-15 04:33:00 ivan
151 updates for newest versoin
153 Revision 1.2 1998/11/15 03:48:49 ivan
154 update for current version