anyone using raw sql? or everyone using an ORM like drizzle? just curious. 🤔
anyone using raw sql? or everyone using an ORM like drizzle? just curious. 
db.query wrapper) but IMO it's very handy to be able to construct SQL with standard JS/TS functions rather than string interpolation.
rows_read vs how many rows you get back (or take a look at wrangler d1 insights and look for query efficiency) - chances are you're missing an index


persist-to flag on my worker and persist on my setupDevPlatform() configuration to point to the shared directory, but it seems that instead of Next using the same sqlite file that's already there, it just creates a new one in the same directory.next dev --turbopack instead of having to build my Next app every time using bunx @cloudflare/next-on-pages && wrangler pages dev
db.queryrows_readwrangler d1 insightspersist-topersistnext dev --turbopackbunx @cloudflare/next-on-pages && wrangler pages dev{
"query": "select \"id\", \"food_id\", \"nutrient_id\", \"amount\", \"derivation_id\", \"created_at\", \"updated_at\", ? || \"_\" || \"food_id\" as \"foodId\" from \"food_nutrients\" \"foodNutrients\" where \"foodNutrients\".\"food_id\" in (?, ?, ?, ?)",
"avgRowsRead": 252,
"totalRowsRead": 504,
"avgRowsWritten": 0,
"totalRowsWritten": 0,
"avgDurationMs": 1.75905,
"totalDurationMs": 3.5181,
"numberOfTimesRun": 2,
"queryEfficiency": 0.9682539682539683
}