EncryptedTable
EncryptedTable is a class in @cipherstash/stack. TypeScript API reference with its signature, parameters, and usage.
Class: EncryptedTable<T>
Defined in: packages/stack/src/schema/index.ts:414
Type Parameters
T
T extends EncryptedTableColumn
Constructors
Constructor
new EncryptedTable<T>(tableName, columnBuilders): EncryptedTable<T>;Defined in: packages/stack/src/schema/index.ts:418
Parameters
tableName
string
columnBuilders
T
Returns
EncryptedTable<T>
Properties
tableName
readonly tableName: string;Defined in: packages/stack/src/schema/index.ts:419
columnBuilders
readonly columnBuilders: T;Defined in: packages/stack/src/schema/index.ts:420
Methods
build()
build(): TableDefinition;Defined in: packages/stack/src/schema/index.ts:442
Compile this table schema into a TableDefinition used internally by the encryption client.
Iterates over all column builders, calls .build() on each, and assembles
the final { tableName, columns } structure. For searchableJson() columns,
the STE-Vec prefix is automatically set to "<tableName>/<columnName>".
Returns
TableDefinition
A TableDefinition containing the table name and built column configs.
Example
const users = encryptedTable("users", {
email: encryptedColumn("email").equality(),
})
const definition = users.build()
// { tableName: "users", columns: { email: { cast_as: "string", indexes: { unique: ... } } } }EncryptedField
Builder for a nested encrypted field (encrypted but not searchable). Create with encryptedField. Use inside nested objects in encryptedTable; supports `.data...
buildEncryptConfig
buildEncryptConfig is a function in @cipherstash/stack. TypeScript API reference with its signature, parameters, and usage.