跳转到内容
简体中文

MsSqlResult

此内容尚不支持你的语言。

MsSqlResult = object

Defined in: src/persistence/journals/MsSqlClient.ts:19

Minimal shapes of the mssql API the SQL Server backends use. Own interfaces (no @types/mssql) so the framework stays dependency-free and tests can inject a fake that satisfies just these methods.

A real mssql.ConnectionPool satisfies MsSqlPoolLike structurally — request(), transaction() and close() are all on it — so injecting one needs no wrapper.

Two shape details worth knowing: mssql binds named parameters (request.input('p1', value), referenced as @p1 in the SQL, and a name may be referenced more than once), and it reports rowsAffected as an array, one entry per statement in the batch.

readonly optional recordset?: ReadonlyArray<Record<string, unknown>>

Defined in: src/persistence/journals/MsSqlClient.ts:21

Rows of the first result set; absent for statements that return none.


readonly optional rowsAffected?: ReadonlyArray<number>

Defined in: src/persistence/journals/MsSqlClient.ts:23

One entry per statement — summed when normalizing.