AIM: create a new package for working with a specific SqliteClient extension
GOAL: make it work with any SqliteClient implementation (node, bun, browser, react native, etc)
OBSTACLE: @effect/sql SqlClient does not declare the loadExtension method
Q: What's the idiomatic Effect-TS way to deal with this?
IDEA: Effect.tryPromise β¦ import("@effect/sql-sqlite-bun") / import("@effect/sql-sqlite-node") / whatever
Feels like there's some more elegant / correct way to do this?
I guess I could define a new Context that accepts any SqliteClient.SqliteClient + loadExtension method
yeah, I guess that's probably the correct way to do it, pushing the layer creation responsibility out to the program entrypoint as much as possible