Skip to content

@saflib/drizzle-sqlite3


Function: queryWrapper()

queryWrapper<T, A>(queryFunc): (...args) => Promise<T>

All queries should use this wrapper. It will catch and obfuscate unhandled errors, and rethrow handled errors, though really handled errors should be returned, not thrown.

Type Parameters

Type Parameter
T
A extends any[]

Parameters

ParameterType
queryFunc(...args) => Promise<T>

Returns

(...args): Promise<T>

Parameters

ParameterType
...argsA

Returns

Promise<T>