
atis.l at mail
Jul 5, 2002, 9:39 PM
Post #1 of 2
(74 views)
Permalink
|
|
Some questions and suggestions
|
|
Hello At first: i digged the source and found the following in <dbmysql.c>: u64_t db_insert_message (u64_t useridnr, const char *deliver_to_mailbox, const char *uniqueid) { ... time(&td); /* get time */ tm = *localtime(&td); /* get components */ strftime(timestr, sizeof(timestr), "%G-%m-%d %H:%M:%S", &tm); snprintf (query, DEF_QUERYSIZE,"INSERT INTO messages(mailbox_idnr,messagesize,unique_id," "internal_date,recent_flag,status)" " VALUES (%llu, 0, \"%s\", \"%s\", 1, '005')", deliver_to_mailbox ? db_get_mailboxid(useridnr, deliver_to_mailbox) : db_get_mailboxid (useridnr, "INBOX"), uniqueid ? uniqueid : "", timestr); ... } wouldn't be easier/better to use the NOW() function in MySQL. And second: It wold be great to have some description for fields in database. It would allow many developers [like me] to write custom applications. I imagine that there could be some file like 'database_layout.txt' in distribution, there are description of tables and fields, with simple examples. When someone changes database structure [adds some fields], he write a patch for description too. I could write document like this if you help me with some things. Right now i'm guessing the meaning of fields in table [messages] ;-) | message_idnr | The unique message ID, must be the same for each two records in [messageblks] | mailbox_idnr | The ID of the IMAP folder, where message are. | messagesize | message size in bytes, i guess | seen_flag | 1 if message is seen, 0 if not. | answered_flag | 1 if answered, 0 if not | deleted_flag | 1 if deleted, 0 if not | flagged_flag | no ideas? | recent_flag | ? | draft_flag | message is draft | unique_id | as i saw in code, this cold be "", but what is it? | internal_date | date and time of receiving. | status | no ideas? | rfcsize | some size, but what's the difference between this and [messagesize]? Could anyone send me this info please?
|