(feat): add Schema\Order for index column directions - #21
Merged
Conversation
Index types already use IndexType; column order was still a raw ASC/DESC string. Schema\Order is the matching enum so call sites do not keep magic strings next to typed index types.
Contributor
Greptile SummaryAdds a schema-specific
Confidence Score: 5/5The PR appears safe to merge with no actionable correctness or security issues identified. The new enum is compatible with the package’s supported runtime and preserves the existing case-insensitive ASC/DESC validation semantics for all reachable string inputs. Important Files Changed
Reviews (1): Last reviewed commit: "(feat): add Schema\Order for index colum..." | Re-trigger Greptile |
📊 Coverage
Full per-file breakdown in the job summary. |
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.
Why
Index definitions already use
IndexType. Column direction was still'ASC'/'DESC'(orDatabase::ORDER_*at call sites). That is the same class of magic stringIndexTyperemoved.OrderDirectionstays on the query AST because it includesRANDOM, which is not a valid index column order.What
Utopia\Query\Schema\OrderwithAsc/DescOrder::tryFrom()Not verified