Skip to main content

createSqlQuery

@retinue/monorepo


@retinue/monorepo / backend/src / createSqlQuery

Function: createSqlQuery()

createSqlQuery(config): (sql) => Promise<SqlResult>

Defined in: backend/src/toolkit/data.ts:197

Parameters​

config​

maxRows?​

number

query​

ReadOnlyQuery

readOnly​

true

An explicit acknowledgement that the connection cannot write.

Not a flag that makes it read-only -- nothing here can do that. It exists so that wiring a read-write connection into a model-driven tool has to be typed out, and so a reviewer can see whether it was.

statementTimeoutMs?​

number

Returns​

(sql) => Promise<SqlResult>