collection-sync / Exports / BasicSyncMetadata
A simple sync metadata manager.
-
↳
BasicSyncMetadata
• new BasicSyncMetadata(lastFetchAt?
, lastPostAt?
)
Name | Type |
---|---|
lastFetchAt? |
Date |
lastPostAt? |
Date |
CollectionSyncMetadata.constructor
example-implementations/BasicSyncMetadata.ts:8
• Private
Optional
_lastFetchAt: Date
example-implementations/BasicSyncMetadata.ts:5
• Private
Optional
_lastPostAt: Date
example-implementations/BasicSyncMetadata.ts:6
▸ getLastAt(syncOperation
): Promise
<undefined
| Date
>
Name | Type |
---|---|
syncOperation |
SyncOperation |
Promise
<undefined
| Date
>
CollectionSyncMetadata.getLastAt
▸ getLastFetchAt(): undefined
| Date
undefined
| Date
CollectionSyncMetadata.getLastFetchAt
example-implementations/BasicSyncMetadata.ts:25
▸ getLastPostAt(): undefined
| Date
undefined
| Date
CollectionSyncMetadata.getLastPostAt
example-implementations/BasicSyncMetadata.ts:29
▸ initialize(): Promise
<void
>
Executes async logic to initialize collection or datastore (open file, create database connection, etc).
Promise
<void
>
CollectionSyncMetadata.initialize
example-implementations/BasicSyncMetadata.ts:14
▸ setLastAt(d
, syncOperation
): Promise
<void
>
Name | Type |
---|---|
d |
Date |
syncOperation |
SyncOperation |
Promise
<void
>
CollectionSyncMetadata.setLastAt
▸ setLastFetchAt(d
): void
Name | Type |
---|---|
d |
Date |
void
CollectionSyncMetadata.setLastFetchAt
example-implementations/BasicSyncMetadata.ts:17
▸ setLastPostAt(d
): void
Name | Type |
---|---|
d |
Date |
void