29 ms·
PGLite is amazing for integration testing of queries against a real in-memory db. Is it possible to use PGLite for that purpose in non-JS environments, like e.
by loevborg 2y ago
PGLite is amazing for integration testing of queries against a real in-memory db.
Is it possible to use PGLite for that purpose in non-JS environments, like e.g. golang?
- samwillis 2y agoYou can use pg-gateway from supabase (https://github.com/supabase-community/pg-gateway https://github.com/supabase-community/pg-gateway) to start a PGlite and connect form any standard PG client. Support for other languages is high on my list, the plan is to build a "libpglite" as a native C lib and a WASI build that can run in any WASM runtime.
- loevborg 2y agoThanks! From my perspective, being able to pull pglite into the same golang process is preferable - faster, less IPC complexity, no risk of leaving lingering state. Making postgres an in-process dependency is much of the appeal of pglite for me.