feat: fields and lookups improvement by implementing auto-discovery for lookups and transforms and adding advanced JSON lookups.#38
Merged
Einswilli merged 11 commits intoAllDotPy:masterfrom Apr 8, 2026
Conversation
Split monolithic files into modular structure for better maintainability: - src/query/lookups/: - lookups.rs: Core types, registry, resolve() logic - common_lookups.rs: Comparison/string lookups (exact, gt, contains, etc.) - date_lookups.rs: Date/time transforms (year, month, day, hour, etc.) - json_lookups.rs: JSON transforms and lookups (key, has_key, etc.) - mod.rs: Re-exports - src/query/compiler/: - compiler.rs: Main SQL compiler implementation - helpers.rs: Internal helpers (quote_col, qualified_col, etc.) - mod.rs: Re-exports All 241 tests pass. No functional changes.
…s and date/time transforms
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.
Summary
This PR refactors the query engine for modularity and implements an auto-discovery system for lookups and transforms to improve developer experience.
Key Changes
lookup.rsandcompiler.rsinto modular directories for better maintainability.Fieldlayer for immediate and precise error reporting.has_keyswithhas_key,has_any, andhas_all, with full support for PostgreSQL, MySQL, and SQLite.QuerySetto catch unsupported filters before they reach the compiler.Impact
Improved DX with early validation errors and enhanced JSON filtering capabilities across all supported backends.