2 use base qw(FS::Record);
8 FS::queue_arg - Object methods for queue_arg records
14 $record = new FS::queue_arg \%hash;
15 $record = new FS::queue_arg { 'column' => 'value' };
17 $error = $record->insert;
19 $error = $new_record->replace($old_record);
21 $error = $record->delete;
23 $error = $record->check;
27 An FS::queue_arg object represents job argument. FS::queue_arg inherits from
28 FS::Record. The following fields are currently supported:
32 =item argnum - primary key
34 =item jobnum - see L<FS::queue>
36 =item frozen - argument is frozen with Storable
48 Creates a new argument. To add the argument to the database, see L<"insert">.
50 Note that this stores the hash reference, not a distinct copy of the hash it
51 points to. You can ask the object for a copy with the I<hash> method.
55 # the new method can be inherited from FS::Record, if a table method is defined
57 sub table { 'queue_arg'; }
61 Adds this record to the database. If there is an error, returns the error,
62 otherwise returns false.
66 # the insert method can be inherited from FS::Record
70 Delete this record from the database.
74 # the delete method can be inherited from FS::Record
76 =item replace OLD_RECORD
78 Replaces the OLD_RECORD with this one in the database. If there is an error,
79 returns the error, otherwise returns false.
83 # the replace method can be inherited from FS::Record
87 Checks all fields to make sure this is a valid argument. If there is
88 an error, returns the error, otherwise returns false. Called by the insert
96 $self->ut_numbern('argnum')
97 || $self->ut_numbern('jobnum')
98 || $self->ut_enum('frozen', [ '', 'Y' ])
99 || $self->ut_anything('arg')
101 return $error if $error;
112 L<FS::queue>, L<FS::Record>, schema.html from the base documentation.