StorageTableSpec

open class StorageTableSpec(val name: String, val supportPartitions: Boolean, val supportExpiration: Boolean, val schemaVersion: Long = 0)

StorageTable's name and features.

NB: Once the table is created for the first time, its features must stay the same.

  • name name of the table, 60 characters at most, ASCII letters, digits or underscore, must start with a letter. Must be a unique name when compared with other table names in non-case-sensitive manner.

  • supportPartitions true if partitions are supported

  • supportExpiration true if expiration is supported

  • schemaVersion (optional) schema version of this table which typically defines the format of the data stored in the table. Initially it is set to 0. When the table is loaded for the first time, schema version is compared with the version saved in the storage and if there is a discrepancy, schemaUpgrade method is called. By default, this method throws IllegalStateException, but it could, for instance just call StorageTable.deleteAll to wipe out incompatible data or it could change table data to make it compatible with the new schema.

Inheritors

Constructors

Link copied to clipboard
constructor(name: String, supportPartitions: Boolean, supportExpiration: Boolean, schemaVersion: Long = 0)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open suspend fun schemaUpgrade(oldTable: BaseStorageTable)