feat: put db con behind feature gate
EDIT: putting this into draft again. there are other issues that I need to figure out before we should continue in this direction.
- [ ] get pg_query (or libpg_query? run build in wasm). link
- [ ] I just pushed everything into this branch. need to clean it up and remove the wasm stuff first.
What kind of change does this PR introduce?
puts database connection behind a feature gate db-connection. the flag is enabled by default, so nothing changes.. turns out default-features is a mess. I will remove them, and instead subscribe to that feature wherever it is relevant.
this is premiliary work for #174. after this pr, my plan is to
- provide a wasm build without any database first and then
- dive deep into integrating pglite. right now, I believe there is still work to be done on their side for us to make the integration seamless.
@juleswritescode I also "copied" the completion params into the workspace trait and implemented From for each. reason is that I do not want to include pgt_completions for the no-db build because it has schema_cache in its dependency, which in turn requires sqlx. yet another reason we should move things into a feature/ directory.
What is the current behavior?
sqlx and database features are built all the time, leading to a failing build for wasm.
What is the new behavior?
we can exclude sqlx from the build by disabling the default feature flag db-connection