We use SQLite for our database., you can use the useDB()
composable to access the database and perform CRUD operations.
Supersaas uses Drizzle ORM for performing SQL queries and operations.
// GET
const users = await useDB().select().from("users");
// POST
const post = await useDB().insert("posts").values({ title: "Hello World" });
// UPDATE
await useDB().update("users").set({ name: "John Doe" }).where({ id: 1 });
// DELETE
await useDB().delete().from("users").where({ id: 1 });