AttachmentService
Internal
Service for querying and watching attachment records in the database.
Constructors
new AttachmentService()
new AttachmentService(
db,
logger,
tableName?,
archivedCacheLimit?): AttachmentService
Parameters
| Parameter | Type |
|---|---|
db | AbstractPowerSyncDatabase |
logger | ILogger |
tableName? | string |
archivedCacheLimit? | number |
Returns
Methods
watchActiveAttachments()
watchActiveAttachments(__namedParameters?): DifferentialWatchedQuery<AttachmentRecord>
Creates a differential watch query for active attachments requiring synchronization.
Parameters
| Parameter | Type |
|---|---|
__namedParameters? | { throttleMs: number; } |
__namedParameters.throttleMs? | number |
Returns
DifferentialWatchedQuery<AttachmentRecord>
Watch query that emits changes for queued uploads, downloads, and deletes
withContext()
withContext<T>(callback): Promise<T>
Executes a callback with exclusive access to the attachment context.
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type |
|---|---|
callback | (context) => Promise<T> |
Returns
Promise<T>