interface IMongoSession
Since 0.1.0

A structural subset of the driver ClientSession — the members the transaction path calls.

Methods

startTransaction(options?: Record<string, unknown>): Promise<void>

Starts the transaction on this session.

commitTransaction(): Promise<void>

Commits the active transaction.

abortTransaction(): Promise<void>

Rolls the active transaction back.

endSession(): Promise<void>

Ends the session, releasing its server resources.

Usage

import { type IMongoSession } from "database-plugin/src/index.ts";