Closed Bug 482670 Opened 16 years ago Closed 16 years ago

WBORecord should implement a .deleted property

Categories

(Cloud Services :: General, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: hello, Assigned: Mardak)

References

Details

WBORecord should have a .deleted property. When serializing, we can check if it's meant to represent a deleted item and if so hardcode a null payload. When deserializing, we can look at the payload and set .deleted appropriately. This will make the code more readable (foo.deleted vs foo.payload === null), and it would make it easier to move to a different serialization format, if we ever wish to do that.
-> 0.4
Priority: -- → P2
Target Milestone: -- → 0.4
Would the payload actually be null or empty string? I thought the server requires a string.?
http://hg.mozilla.org/labs/weave/rev/03a08e4e576e Expose a .deleted property that engines can set to true to store an even thinner deleted payload (empty string "" instead of "[null]") on the server. Handle deserializing of deleted records by setting the property. Note: Engines must set their payloads to something JSON-able if it's not a delete record.
Assignee: nobody → edilee
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Version: unspecified → Trunk
Depends on: 478327, 483671
Blocks: 482878
Component: Weave → General
Product: Mozilla Labs → Weave
Version: Trunk → unspecified
QA Contact: weave → general
You need to log in before you can comment on or make changes to this bug.