Open Bug 1952094 Opened 10 days ago Updated 5 days ago

Stop using detached nsIMsgDBHdr objects

Categories

(MailNews Core :: Database, task)

Tracking

(Not tracked)

ASSIGNED

People

(Reporter: benc, Assigned: benc)

References

(Blocks 2 open bugs)

Details

(Keywords: leave-open)

Attachments

(1 file)

Mork supports the concept of detached rows, so you can create a row, populate it with data and then add it to the database.
This is used when adding new message entries to the DB: a detached nsIMsgDBHdr object is created, populated with data, then attached to the message table in the database.
This is rather a pain for a msgDB implemented on top of sqlite (i.e. a globaldb).

So it'd be much better to just have a function that lets us pass in the raw data we want for the message, and return a new, already-populated nsIMsgDBHdr object. This'd still work fine for the existing database, and would make the globaldb much easier.

Keywords: leave-open

This patch adds a raw data struct to let the caller create a message without
using a detached nsIMsgDBHdr.

Blocks: 1876407

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/6b9365a770df
Add nsIMsgDatabase.addMsgHdr(). r=mkmelin

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: