collection-sync / Exports / SyncItem
Contains an ID that identifies the synchronizable object, the document data itself, and updatedAt (which is used to determine whether the document must be synchronized or not).
• new SyncItem(id, document, updatedAt, action?)
| Name | Type |
|---|---|
id |
DocId |
document |
any |
updatedAt |
Date |
action |
SyncItemAction |
• Private _action: SyncItemAction
• Private _document: any
• Private _id: DocId
• Private _updatedAt: Date
• get document(): any
any
• get id(): DocId
DocId
• get isDelete(): boolean
Determines whether the item should be removed from the database or not.
boolean
• get isUpdate(): boolean
Determines whether the item should be updated or not.
boolean
• get updatedAt(): Date
Date
▸ equals(other): boolean
| Name | Type |
|---|---|
other |
undefined | SyncItem |
boolean
▸ update(document, updatedAt): void
| Name | Type |
|---|---|
document |
any |
updatedAt |
Date |
void