-
-
Notifications
You must be signed in to change notification settings - Fork 0
Description
#6 adds the proof of concept but until there's a database backing it, realworld utility will be very limited.
Postgres has been my preferred db for a long time, and pglite seems like it could give us the best of both worlds - an embeddable db for browser usage and easy deployment, and the same API if you want to connect a full Postgres server, or one of its many cloud formations. For now browser usage is not a priority for me, and it won't be in the initial implementation, but it will be very useful in the future.
I haven't used Drizzle but it's what I see recommended the most among Svelte users. Previously I've just used postgres and a small migration lib, and Drizzle looks like it strikes a balance I like with SQL and it can be used with postgres. See also drizzle-zod. I did some benchmarks -- https://github.com/ryanatkn/sql-js-benchmarks/blob/main/results/output.md -- my current takeaway is that I'll make a thin wrapper around @electric-sql/pglite and pg's drivers due to the apparent costs.