Repository navigation
fix(vquery): unify SQL dialects and make IndexedDB opt-in - #559
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
💡 Background and solution
Expose reusable, parameterized DSL compilation through
compileQuery(dsl, { table, columns, dialect }), defaulting to MySQL. MySQL and DuckDB strategies own their SQL differences; dataset queries explicitly keep using DuckDB.convertDSLToSQLwithconvertDSLToMysqlandconvertDSLToDuckDB; export the compiler and option/result types from both entrypoints.VQueryOptions;new VQuery({ enableIndexedDB: true })explicitly selects IndexedDB persistence. Queries continue to run in memory.@visactor/vquery: patch.Callers of the removed
convertDSLToSQLhelper should select the explicit dialect helper, or usecompileQueryfor{ sql, parameters }output.🧪 Validation
pnpm --filter @visactor/vquery run g: generated output reviewed; no new SQL snapshot differences.pnpm --filter @visactor/vquery run test:coverage: 595 tests passed; statements, branches, functions and lines all 100%.src/**and the existing thresholds. Both independent strategy constructors are fully covered; neither runtime entrypoint is excluded from coverage.lint:check,format:check,typecheck --forceand separate vquery test typechecking: passed; 24 typecheck/build tasks executed with no cache hits.changeset status --since=origin/main: passed.http://localhost:3000/VBI/, the vquery storage documentation and aggregation examples: average 6,400 rendered correctly; no console warnings/errors observed.☑️ Self-Check before Merge