5 use FS::Record qw( qsearch qsearchs );
11 FS::conf - Object methods for conf records
17 $record = new FS::conf \%hash;
18 $record = new FS::conf { 'column' => 'value' };
20 $error = $record->insert;
22 $error = $new_record->replace($old_record);
24 $error = $record->delete;
26 $error = $record->check;
30 An FS::conf object represents a configuration value. FS::conf inherits from
31 FS::Record. The following fields are currently supported:
35 =item confnum - primary key
37 =item agentnum - the agent to which this configuration value applies
39 =item name - the name of the configuration value
41 =item value - the configuration value
52 Creates a new configuration value. To add the example to the database, see L<"insert">.
54 Note that this stores the hash reference, not a distinct copy of the hash it
55 points to. You can ask the object for a copy with the I<hash> method.
63 Adds this record to the database. If there is an error, returns the error,
64 otherwise returns false.
70 Delete this record from the database.
74 =item replace OLD_RECORD
76 Replaces the OLD_RECORD with this one in the database. If there is an error,
77 returns the error, otherwise returns false.
83 Checks all fields to make sure this is a valid configuration value. If there is
84 an error, returns the error, otherwise returns false. Called by the insert
93 $self->ut_numbern('confnum')
94 || $self->ut_foreign_keyn('agentnum', 'agent', 'agentnum')
95 || $self->ut_text('name')
96 || $self->ut_anything('value')
98 return $error if $error;
109 L<FS::Record>, schema.html from the base documentation.