CipherStashDocs
StackLatestPackagesStackSrcEncryptionClasses

EncryptQueryOperation

EncryptQueryOperation is a class in @cipherstash/stack. TypeScript API reference with its signature, parameters, and usage.

@cipherstash/stack


Class: EncryptQueryOperation

Defined in: packages/stack/src/encryption/operations/encrypt-query.ts:20

Extends

Constructors

Constructor

new EncryptQueryOperation(
   client, 
   plaintext, 
   opts): EncryptQueryOperation;

Defined in: packages/stack/src/encryption/operations/encrypt-query.ts:21

Parameters

client

Client

plaintext

JsPlaintext | null | undefined

opts

QueryTermBase

Returns

EncryptQueryOperation

Overrides

EncryptionOperation<EncryptedQueryResult>.constructor

Methods

audit()

audit(config): this;

Defined in: packages/stack/src/encryption/operations/base-operation.ts:20

Attach audit metadata to this operation. Can be chained.

Parameters

config

AuditConfig

Configuration for ZeroKMS audit logging

Returns

this

Inherited from

EncryptionOperation.audit

getAuditData()

getAuditData(): AuditData;

Defined in: packages/stack/src/encryption/operations/base-operation.ts:28

Get the audit data for this operation.

Returns

AuditData

Inherited from

EncryptionOperation.getAuditData

then()

then<TResult1, TResult2>(onfulfilled?, onrejected?): Promise<TResult1 | TResult2>;

Defined in: packages/stack/src/encryption/operations/base-operation.ts:42

Make the operation thenable

Type Parameters

TResult1

TResult1 = Result<EncryptedQueryResult, EncryptionError>

TResult2

TResult2 = never

Parameters

onfulfilled?

(value) => TResult1 | PromiseLike<TResult1> | null

onrejected?

(reason) => TResult2 | PromiseLike<TResult2> | null

Returns

Promise<TResult1 | TResult2>

Inherited from

EncryptionOperation.then

withLockContext()

withLockContext(lockContext): EncryptQueryOperationWithLockContext;

Defined in: packages/stack/src/encryption/operations/encrypt-query.ts:29

Parameters

lockContext

LockContext

Returns

EncryptQueryOperationWithLockContext


execute()

execute(): Promise&lt;Result&lt;EncryptedQueryResult, EncryptionError&gt;>;

Defined in: packages/stack/src/encryption/operations/encrypt-query.ts:41

Execute the operation and return a Result

Returns

Promise<Result<EncryptedQueryResult, EncryptionError>>

Overrides

EncryptionOperation.execute

getOperation()

getOperation(): {
  client: Client;
  plaintext: JsPlaintext | null | undefined;
  column: EncryptedColumn;
  table: EncryptedTable&lt;EncryptedTableColumn&gt;;
  queryType?: QueryTypeName;
  returnType?: EncryptedReturnType;
};

Defined in: packages/stack/src/encryption/operations/encrypt-query.ts:109

Returns

{
  client: Client;
  plaintext: JsPlaintext | null | undefined;
  column: EncryptedColumn;
  table: EncryptedTable&lt;EncryptedTableColumn&gt;;
  queryType?: QueryTypeName;
  returnType?: EncryptedReturnType;
}
client
client: Client;
plaintext
plaintext: JsPlaintext | null | undefined;
column
column: EncryptedColumn;
table
table: EncryptedTable&lt;EncryptedTableColumn&gt;;
queryType?
optional queryType: QueryTypeName;
returnType?
optional returnType: EncryptedReturnType;

On this page