the first one is used for any mutations, and the rest (second param) are for read-only queries
the first one is used for any mutations, and the rest (second param) are for read-only queries
{ "prepare": true } I get 100% cache misses on a simple SELECT like const [user]: [User?] = await sql`SELECT * FROM users WHERE id = ${userId};. If I set { “prepare”: false } then latency improves, I get some cache hits but the majority are marked as uncacheable on the same repeated query. Any help is greatly appreciated, (happy to DM my connection id) - thanks.
random() in your SELECT statement). Offering a better option for this is on our radar but not for very soon.






{ "prepare": true }const [user]: [User?] = await sql`SELECT * FROM users WHERE id = ${userId}{ “prepare”: false }random()[ERROR] A request to the Cloudflare API (/accounts/[account-id]/hyperdrive/configs/[config-id]) failed.
Internal Server Error [code: 10000]
Token Permissions: If scopes are missing, you may need to logout and re-login.
Scope (Access)
- account (read)
- user (read)
- workers (write)
- workers_kv (write)
- workers_routes (write)
- workers_scripts (write)
- workers_tail (read)
- d1 (write)
- pages (write)
- zone (read)
- ssl_certs (write)
- constellation (write)
- ai (write)
- queues (write)
- offline_access