There's no long-running connection to cache, and so I'd consider this an anti-pattern (I assume you'
There's no long-running connection to cache, and so I'd consider this an anti-pattern (I assume you're trying to reduce latency)
const result = await env.DB.prepare(
SELECT *
FROM weekly
WHERE weekNumber = ?1
)
.bind(weekNumber)
.first()result {"_id":1,"weekNumber":3,"topic":"What [object Object]
result {"type":"table","name":"weekly","tbl_name":"weekly","rootpage":7,"sql":"CREATE TABLE weekly (\r\n _id INTEGER PRIMARY KEY AUTOINCREMENT,\r\n weekNumber INTEGER NOT NULL,\r\n topic TEXT NOT NULL\r\n)"}wrangler d1 execute MYDB --file=MYFILE.sql it is suuperr fast,.prepare(..).bind(..).run(..), it takes on average 20 rows/second which is very slow.wrangler?
Give your binding a name under Variable name.

name is imminent)

const result = await env.DB.prepare(
SELECT *
FROM weekly
WHERE weekNumber = ?1
)
.bind(weekNumber)
.first()const result = await env.DB.prepare(
`SELECT *
FROM weekly
WHERE weekNumber = ?1`
)
.bind(weekNumber)
.first()
console.log('result', JSON.stringify(result))result {"type":"table","name":"weekly","tbl_name":"weekly","rootpage":7,"sql":"CREATE TABLE weekly (\r\n _id INTEGER PRIMARY KEY AUTOINCREMENT,\r\n weekNumber INTEGER NOT NULL,\r\n topic TEXT NOT NULL\r\n)"}wrangler d1 execute MYDB --file=MYFILE.sql.prepare(..).bind(..).run(..)nameimminentawait db.prepare("select * from notifications where ? = 1")
.bind(name)
.all()select * from notifications where imminent = 1```js
// my code