1 package FS::table_name;
2 use base qw( FS::Record );
5 use FS::Record qw( qsearch qsearchs );
9 FS::table_name - Object methods for table_name records
15 $record = new FS::table_name \%hash;
16 $record = new FS::table_name { 'column' => 'value' };
18 $error = $record->insert;
20 $error = $new_record->replace($old_record);
22 $error = $record->delete;
24 $error = $record->check;
28 An FS::table_name object represents an example. FS::table_name inherits from
29 FS::Record. The following fields are currently supported:
33 =item field - description
43 Creates a new example. To add the example to the database, see L<"insert">.
45 Note that this stores the hash reference, not a distinct copy of the hash it
46 points to. You can ask the object for a copy with the I<hash> method.
50 # the new method can be inherited from FS::Record, if a table method is defined
52 sub table { 'table_name'; }
56 Adds this record to the database. If there is an error, returns the error,
57 otherwise returns false.
61 # the insert method can be inherited from FS::Record
65 Delete this record from the database.
69 # the delete method can be inherited from FS::Record
71 =item replace OLD_RECORD
73 Replaces the OLD_RECORD with this one in the database. If there is an error,
74 returns the error, otherwise returns false.
78 # the replace method can be inherited from FS::Record
82 Checks all fields to make sure this is a valid example. If there is
83 an error, returns the error, otherwise returns false. Called by the insert
88 # the check method should currently be supplied - FS::Record contains some
89 # data checking routines
95 $self->ut_numbern('primary_key')
96 || $self->ut_number('validate_other_fields')
98 return $error if $error;
107 The author forgot to customize this manpage.