© 2026 Hedgehog Software, LLC
undefined
db.update
app.put("/todos/:id", async (c) => { const { id } = c.req.param(); const existing = await db.query.todos.findFirst({ with: { id } }); if (existing) { await db .update(todos) .set({ complete: !existing.complete }) .where(eq(todos.id, id)); } const result = await db.query.todos.findMany(); return c.html(<Todos todos={result} />); });
db.update(todos).set...
db
todos
export const todos = sqliteTable("todos", { id: text("id").primaryKey(), name: text("name").notNull(), complete: integer("complete", { mode: "boolean" }).notNull().default(false), });