KandraColumnRef

class KandraColumnRef<T>(val cqlName: String, val isLookup: Boolean = false)

Type-safe reference to a CQL column. Produced by kandra-codegen or constructed manually.

Comparison operators (eq/gt/gte/lt/lte/isIn) are declared as QueryContext member extensions, not here — see QueryContext for why.

cqlName is validated against CqlNaming.isValidIdentifier at construction time — the same basic CQL-identifier-shape check SchemaRegistry.buildSchema (kandra-core) applies to every column name resolved from an entity's properties, and that kandra-codegen's KandraProcessor always produces (see GH-30). Every *Table.<column> reference generated by kandra-codegen therefore always passes this check; it exists to catch a KandraColumnRef built by hand from an unvalidated string (e.g. a user-influenced value in dynamic filtering/admin tooling) before cqlName reaches QueryExecutor.buildWhere(), which splices it unparameterized into the generated WHERE clause — see GH-33.

Constructors

Link copied to clipboard
constructor(cqlName: String, isLookup: Boolean = false)

Properties

Link copied to clipboard
Link copied to clipboard
val isLookup: Boolean = false