Compare commits

...

1 Commits

Author SHA1 Message Date
Owen
6b3a6fa380 Add typecasts 2026-03-25 22:11:56 -07:00

View File

@@ -146,7 +146,7 @@ export async function flushSiteBandwidthToDb(): Promise<void> {
// support UPDATE … FROM (VALUES …), letting us update the whole chunk
// in a single query instead of N individual round-trips.
const valuesList = chunk.map(([publicKey, { bytesIn, bytesOut }]) =>
sql`(${publicKey}, ${bytesIn}, ${bytesOut})`
sql`(${publicKey}::text, ${bytesIn}::real, ${bytesOut}::real)`
);
const valuesClause = sql.join(valuesList, sql`, `);