Updates to insights, event data, telemetry.

This commit is contained in:
Mike Cao 2023-07-23 13:18:01 -07:00
parent 39562d4a64
commit e4bd314bd6
44 changed files with 413 additions and 278 deletions

9
lib/sql.ts Normal file
View file

@ -0,0 +1,9 @@
export function buildSql(query: string, parameters: object) {
const params = { ...parameters };
const sql = query.replaceAll(/\$[\w_]+/g, name => {
return name;
});
return { sql, params };
}