LookupTableSchema

data class LookupTableSchema(val tableName: String, val indexColumn: ColumnSchema, val partitionKeyColumns: List<ColumnSchema>, val consistency: LookupConsistency, val clusteringKeyColumns: List<ColumnSchema> = emptyList(), val keyspace: String? = null)

Constructors

Link copied to clipboard
constructor(tableName: String, indexColumn: ColumnSchema, partitionKeyColumns: List<ColumnSchema>, consistency: LookupConsistency, clusteringKeyColumns: List<ColumnSchema> = emptyList(), keyspace: String? = null)

Properties

Link copied to clipboard

All clustering key columns of the primary table, stored alongside the partition key columns so a lookup resolution can reconstruct the primary table's full key (partition + clustering), not just its partition key. Empty for a primary table with no clustering key. See ISS-029: before this field existed, lookup resolution could only ever supply selectById with the partition key, which stopped being sufficient once ISS-025 made selectById require the full key on any clustering-keyed entity.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val keyspace: String? = null

Inherited from the parent entity; null = the plugin's default keyspace.

Link copied to clipboard

All partition key columns of the primary table — needed to reconstruct the primary key.

Link copied to clipboard

tableName when keyspace is null, else "$keyspace.$tableName".

Link copied to clipboard

The primary table's key columns (partitionKeyColumns + clusteringKeyColumns) that the lookup table stores as plain columns next to indexColumn, in that order. When the indexed column is itself one of those key columns (@LookupIndex on a @ClusteringKey or @PartitionKey), it is already the lookup table's own key and is left out here, so the lookup DDL and INSERT name it once. GH #187: listing it twice produced CREATE TABLE ... (request_id UUID, user_id UUID, request_id UUID, ...), which the database rejects.

Link copied to clipboard