StackLatestSchemaClasses
EncryptedTable
API reference for EncryptedTable
Class: EncryptedTable<T>
Defined in: .tmp-stack/packages/stack/src/schema/index.ts:356
Type Parameters
T
T extends EncryptedTableColumn
Constructors
Constructor
new EncryptedTable<T>(tableName, columnBuilders): EncryptedTable<T>;Defined in: .tmp-stack/packages/stack/src/schema/index.ts:360
Parameters
tableName
string
columnBuilders
T
Returns
EncryptedTable<T>
Properties
tableName
readonly tableName: string;Defined in: .tmp-stack/packages/stack/src/schema/index.ts:361
Methods
build()
build(): TableDefinition;Defined in: .tmp-stack/packages/stack/src/schema/index.ts:384
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: ... } } } }