JdbcStorageTable

Constructors

Link copied to clipboard
constructor(storage: JdbcStorage, sql: SqlStatementMaker)

Properties

Link copied to clipboard
Link copied to clipboard
open override val storage: JdbcStorage

The Storage the table belongs to.

Functions

Link copied to clipboard
protected fun checkExpiration(expiration: Instant)

Verifies that expiration is supported by this table.

Link copied to clipboard
protected fun checkKey(key: String)

Verifies that key is non-empty and does not exceed the maximum key length.

Link copied to clipboard
protected fun checkLimit(limit: Int)

Verifies that limit is non-negative.

Link copied to clipboard
protected fun checkPartition(partitionId: String?)

Verifies that partitionId conforms to this table's partitioning configuration.

Link copied to clipboard
open suspend override fun delete(key: String, partitionId: String?): Boolean

Deletes data.

Link copied to clipboard
open suspend override fun deleteAll()

Deletes all data previously stored in this table.

Link copied to clipboard
open suspend override fun deletePartition(partitionId: String)

Deletes all data previously stored in this the given partition.

Link copied to clipboard
open suspend override fun enumerate(partitionId: String?, afterKey: String?, limit: Int): List<String>

Enumerate keys of the records with given table and partitionId in key lexicographic order.

Link copied to clipboard
open suspend override fun enumerateWithData(partitionId: String?, afterKey: String?, limit: Int): List<Pair<String, ByteString>>

Enumerate the records with given table and partitionId in key lexicographic order.

Link copied to clipboard
open suspend override fun get(key: String, partitionId: String?): ByteString?

Gets data.

Link copied to clipboard
open suspend override fun insert(key: String?, data: ByteString, partitionId: String?, expiration: Instant): String

Stores new data.

Link copied to clipboard
open suspend override fun purgeExpired()

Reclaim storage that is taken up by the expired entries.

Link copied to clipboard
protected fun recordDescription(key: String, partitionId: String?): String

Returns a human-readable description of a record identified by key and partitionId.

Link copied to clipboard
open suspend override fun update(key: String, data: ByteString, partitionId: String?, expiration: Instant?)

Updates data that is already stored in the engine.