Skip to content

TableOptionsBuilder ​

TableOptionsBuilder ​

Fluent builder for table-level options (Cassandra/ScyllaDB). Chain methods to configure compaction, compression, caching, and more.

compaction ​

Set compaction strategy and options.

Parameters ​

NameDescription
strategyFully qualified compaction class name.
optionsAdditional compaction parameters.

compression ​

Parameters ​

NameDescription
optionsCompression map.

Example ​

typescript
{
  class: 'LZ4Compressor'
}

gcGraceSeconds ​

Set GC grace seconds.

Parameters ​

NameDescription
secondsNumber of seconds before tombstones are dropped.

caching ​

Configure caching options.

Parameters ​

NameDescription
keys'ALL' or 'NONE'.
rows'ALL', 'NONE', or a fractional string (e.g., '0.01').

defaultTTL ​

Set default TTL for the table.

Parameters ​

NameDescription
secondsTime-to-live in seconds.

speculativeRetry ​

Set speculative retry policy.

Parameters ​

NameDescription
valueRetry policy (e.g., 'NONE', 'ALWAYS', 'NUM_N', 'CUSTOM').

comment ​

Add a comment to the table.

Parameters ​

NameDescription
textComment text.

addCustomOption ​

Add a custom option not covered by built-ins.

Parameters ​

NameDescription
keyOption key.
valueOption value.

build ​

Build and return the configured TableOptions object.

Released under the MIT License.