archive

suspend fun archive(queue: String, id: Long): Result<Boolean>(source)

Archives an item identified by its ID from a specified queue.

Return

A Result containing a boolean which indicates whether the archiving process was successful.

Parameters

queue

The name of the queue from which the item will be archived.

id

The unique identifier of the item to be archived.


suspend fun archive(queue: String, ids: List<Long>): Result<List<Long>>(source)

Archives the specified items identified by their IDs from the given queue.

Return

A Result containing a list of successfully archived item IDs or an error if the operation fails.

Parameters

queue

The name of the queue from which the items should be archived.

ids

A list of unique identifiers representing the items to be archived.


context(db: QueryExecutor)
suspend fun archive(queue: String, id: Long): Result<Boolean>(source)

Archives a message in the specified queue by calling the pgmq.archive function.

Return

A result encapsulating a boolean value, where true indicates successful archival and false indicates failure or no action taken.

Parameters

queue

The name of the queue where the message resides.

id

The unique identifier of the message to archive.


context(db: QueryExecutor)
suspend fun archive(queue: String, ids: List<Long>): Result<List<Long>>(source)

Archives messages identified by their IDs from a specified queue.

Return

A Result containing a list of IDs that were successfully archived.

Parameters

queue

The name of the queue from which messages are to be archived.

ids

A list of message IDs to archive.