1 package FS::table_name;
5 use FS::Record qw( qsearch qsearchs );
11 FS::table_name - Object methods for table_name records
17 $record = new FS::table_name \%hash;
18 $record = new FS::table_name { 'column' => 'value' };
20 $error = $record->insert;
22 $error = $new_record->replace($old_record);
24 $error = $record->delete;
26 $error = $record->check;
30 An FS::table_name object represents an example. FS::table_name inherits from
31 FS::Record. The following fields are currently supported:
35 =item field - description
45 Creates a new example. To add the example to the database, see L<"insert">.
47 Note that this stores the hash reference, not a distinct copy of the hash it
48 points to. You can ask the object for a copy with the I<hash> method.
52 # the new method can be inherited from FS::Record, if a table method is defined
54 sub table { 'table_name'; }
58 Adds this record to the database. If there is an error, returns the error,
59 otherwise returns false.
63 # the insert method can be inherited from FS::Record
67 Delete this record from the database.
71 # the delete method can be inherited from FS::Record
73 =item replace OLD_RECORD
75 Replaces the OLD_RECORD with this one in the database. If there is an error,
76 returns the error, otherwise returns false.
80 # the replace method can be inherited from FS::Record
84 Checks all fields to make sure this is a valid example. If there is
85 an error, returns the error, otherwise returns false. Called by the insert
90 # the check method should currently be supplied - FS::Record contains some
91 # data checking routines
103 $Id: table_template.pm,v 1.1 1999-08-04 08:03:03 ivan Exp $
107 The author forgot to customize this manpage.
111 L<FS::Record>, schema.html from the base documentation.
115 ivan@voicenet.com 97-jul-1
118 ivan@sisd.com 97-nov-13
120 $Log: table_template.pm,v $
121 Revision 1.1 1999-08-04 08:03:03 ivan
122 move table subclass examples out of production directory
124 Revision 1.4 1998/12/29 11:59:57 ivan
125 mostly properly OO, some work still to be done with svc_ stuff
127 Revision 1.3 1998/11/15 04:33:00 ivan
128 updates for newest versoin
130 Revision 1.2 1998/11/15 03:48:49 ivan
131 update for current version