I mean someone made a CMS on workers https://discord.com/channels/595317990191398933/783765338692386
I mean someone made a CMS on workers https://discord.com/channels/595317990191398933/783765338692386886/1133082793962909846
__D1_BETA__DB__D1_BETA__DB and you will see lots of convos about it might be able to find something to fix it there
cf-bindings-proxy (v0.5.0) to fix this bug. expires_at column and using that in your queries (and indexes) can get you there. You can do a cleanup with another trigger or a Cron Trigger Worker that runs periodically and separately cleans up WHERE expires_at < now()SqliteError: no such table: my-tablemy-table table at all. Is this definitely the code you’re running?const [{ results: sessionResults},{ results: userFromJoinResults }]
= (await db.batch([ getSessionStatement, getUserFromJoinStatement
])); const batchRes = (await db.batch([
getSessionStatement,
getUserFromJoinStatement
]));
const sessionResults = batchRes[0].results
const userFromJoinResults = batchRes[1].resultsexpires_atWHERE expires_at < now()SqliteError: no such table: my-table#[derive(Deserialize, Serialize, Debug)]
struct Thing {
thing_id: String,
desc: String,
num: u32,
}
#[event(fetch, respond_with_errors)]
async fn main(req: Request, env: Env, _ctx: Context) -> Result<Response> {
Router::new()
.get_async("/:id", |_, ctx| async move {
let id = ctx.param("id").unwrap();
let d1 = ctx.env.d1("DB")?;
let statement = d1.prepare("SELECT * FROM todos WHERE id = ?");
let query = statement.bind(&[id.into()])?;
let result = query.first::<Thing>(None).await?;
match result {
Some(thing) => Response::from_json(&thing),
None => Response::error("Not found", 404),
}
})
.run(req, env)
.await
}my-table