export function runWithLogging()

in src/lib/db.ts [27:40]


export function runWithLogging(
	queryConfig: QueryConfig,
	pool: Pool,
): Promise<QueryResult> {
	return pool.query(queryConfig).then((result: QueryResult) => {
		logInfo(
			`Query: ${JSON.stringify(queryConfig)}. Affected ${
				result.rowCount ?? 0
			} row(s): `,
			result.rows,
		);
		return result;
	});
}