typecql
Version:
ORM for CQL databases.
26 lines (25 loc) • 877 B
TypeScript
import { TransactionEntity } from './transaction.entity';
import { Client } from 'cassandra-driver';
import { consistencies } from '../misc/types/consistencies';
export declare class Transaction {
private client;
private batchQueries;
constructor(client: Client);
/**
* Of methods returns transaction instance of entity.
* @param entity - registered entity with metadata.
* @link https://typecql.com/#Transactions
*/
of<K extends new (...args: any[]) => any>(entity: K): TransactionEntity<InstanceType<K>>;
/**
* Method that executes transaction with provided queries and data.
* @link https://typecql.com/#Transactions
*/
executeTransaction(options?: {
consistency?: consistencies;
isCounterBatch?: boolean;
experimental?: boolean;
}): Promise<{
wasApplied: boolean;
}>;
}