|
|
[Package Index | Mudlib Index | Effect Index]
File /cmds/errors_base.c
This is the low level error database inheritable. It handles all such
annoying things as connecting to the server and sending the queries.
There are 2 levels of functions, you can do your own queries or
leave the details to this object.
The errors database contains the following fields in the errors table:
- Id - The unique identifier for a report
- DirEntryDate - The date the report was entered into the directory
(changes when forwarded)
- EntryDate - The date the report was made in time() format
- FixDate - The date the report was fixed or marked otherwise in time()
format
- Directory - The directory the report belongs to
- Filename - The filename of the object the report was made on
- Category - The category the report belongs to, one of 'ROOM', 'OBJECT',
'RITUAL', 'SPELL', 'HELP', or 'COMMAND'
- Type - The type of the report, one of 'TYPO', 'BUG' or 'IDEA'
- Name - The name of the object
- Reporter - The name of the person who made the report
- Fixer - The name of the person who fixed the report or otherwise marked
it
- Status - The status of the report, one of 'OPEN', 'FIXING',
'CONSIDERING', 'DENIED', or 'FIXED'
- Report - The text of the report as typed by the reporter
- Runtime - The runtime error that may or may not(!) relate to the
report
There are is also a separate table for forwards, which has the following
fields:
- Id - The bug report id the forward belongs to
- ForwardDate - The date the report was forwarder in time() format
- Forwarder - The name of the person who forwarded the report
- OldDirectory - The directory the report belonged to before forwarding
Finally, a table for comments exists with the following fields:
- Id - The bug report id the comment belongs to
- CommentDate - The date someone made a comment on the report in time()
format
- Commenter - The name of the person who commented on the report
- Comment - The comment about the report
Written by Turrican
Includes
This class includes the following files /include/db.h, /include/log.h and /include/config.hMethod index
- comment_bug(mixed, int, string, string)
This method stores a comment about the report.
- finish_errors(mixed)
This method ends access to the database.
- forward_bug(mixed, int, string)
This method forwards the bug report to a different directory.
- get_comments(mixed, int)
This method gets the comments about a report in the database.
- get_fields(mixed, string, string, string)
This method fetches the specified fields from the database.
- get_forwards(mixed, int)
This method gets the forwarding info for a report in the database.
- get_row(mixed, int, int)
This method returns a row of information from the database.
- init_errors(mixed, string, int)
This method initializes some state variables and connects to the errors
database.
- save_changes(mixed, string)
This method saves any pending changes into the database.
- set_status(mixed, int, string)
This method changes the status of a bug report.
- set_type(mixed, int, string)
This method changes the type of a bug report.
- sql_query(mixed, string, mixed * args)
This method provides direct SQL access to the errors database.
Protected Functions
These are functions that only objects inheriting the class can access.
string comment_bug(mixed key,
int row,
string who,
string comment)
This method stores a comment about the report.
Unlike most other methods, this is immediately saved in the
comments table!
- Parameters:
key - the unique key for the global variables
row - the row number of the bug to forward
who - the name of the commenter
comment - the text of the comment
- Returns:
0 for succes, an error string for failure
string finish_errors(mixed key)
This method ends access to the database. It doesn't save any pending
changes.
|