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 The author forgot to customize this manpage.
107 L<FS::Record>, schema.html from the base documentation.