setDocumentExpiration

expect fun setDocumentExpiration(id: String, expiration: Instant?)(source)

Deprecated

Use defaultCollection.setDocumentExpiration()

Replace with

defaultCollection.setDocumentExpiration(id, expiration)

Sets an expiration date for a document in the default collection. The document will be purged from the database at the set time.

Parameters

id

The ID of the Document

expiration

Nullable expiration timestamp as an Instant date, set timestamp to null to remove expiration date time from doc.

Throws

Throws an exception if any error occurs during the operation.

actual fun setDocumentExpiration(id: String, expiration: Instant?)(source)

Deprecated

Use defaultCollection.setDocumentExpiration()

Replace with

defaultCollection.setDocumentExpiration(id, expiration)
actual fun setDocumentExpiration(id: String, expiration: Instant?)(source)

Deprecated

Use defaultCollection.setDocumentExpiration()

Replace with

defaultCollection.setDocumentExpiration(id, expiration)