Closed
Bug 482670
Opened 16 years ago
Closed 16 years ago
WBORecord should implement a .deleted property
Categories
(Cloud Services :: General, defect, P2)
Cloud Services
General
Tracking
(Not tracked)
RESOLVED
FIXED
0.4
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.
Assignee | ||
Comment 2•16 years ago
|
||
Would the payload actually be null or empty string? I thought the server requires a string.?
Assignee | ||
Comment 3•16 years ago
|
||
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
Assignee | ||
Updated•16 years ago
|
Updated•16 years ago
|
Component: Weave → General
Product: Mozilla Labs → Weave
Version: Trunk → unspecified
Updated•16 years ago
|
QA Contact: weave → general
You need to log in
before you can comment on or make changes to this bug.
Description
•