To prevent SQL injection, where you can pass values seperately from the query.
To prevent SQL injection, where you can pass values seperately from the query.
{sql: string, values: string} so that wouldn't be an issue.toUnixTimestamp(timestamp) * 10001693800900000 is a perfectly valid js number.
writeDataPoint and waitUntil. It's not clear to me if I need to call waitUntil and wrap writeDataPoint into a Promise.writeDataPoint affect or add latency to my worker response? My team is afraid we need to wrap it and use waitUntil but I'd need to do some hacks with performance.now() because it would return a different value if it's executed inside waitUntil.Calls to writeDataPoint will return immediately while processing of the data point continues in the background.https://developers.cloudflare.com/analytics/analytics-engine/get-started/
toDateTime and friends to query - works almost just as well(intDiv(toUInt32(timestamp), 120) * 120) * 1000 as x Input was invalid: cannot combine the DateTime and String types with the >= operator: "timestamp" >= '2023-03-01 00:00:00' WHERE timestamp > NOW() - INTERVAL '7' DAYwriteDataPointwriteDataPointwriteDataPointperformance.now()toDateTime