CipherStash Docs
StackLatestSchemaFunctions

encryptedColumn

API reference for encryptedColumn

@cipherstash/stack


Function: encryptedColumn()

function encryptedColumn(columnName): EncryptedColumn;

Defined in: .tmp-stack/packages/stack/src/schema/index.ts:569

Define an encrypted column within a table schema.

Creates a EncryptedColumn builder for the given column name. Chain index methods (.equality(), .freeTextSearch(), .orderAndRange(), .searchableJson()) and/or .dataType() to configure searchable encryption and the plaintext data type.

Parameters

columnName

string

The name of the database column to encrypt.

Returns

EncryptedColumn

A new EncryptedColumn builder.

Example

import { encryptedTable, encryptedColumn } from "@cipherstash/stack/schema"

const users = encryptedTable("users", {
  email: encryptedColumn("email").equality().freeTextSearch().orderAndRange(),
})

On this page