Resolve scope names to tables via Style::realName#120
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #120 +/- ##
=========================================
Coverage 99.72% 99.72%
- Complexity 149 150 +1
=========================================
Files 3 3
Lines 362 365 +3
=========================================
+ Hits 361 364 +3
Misses 1 1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Mapper used the scope name verbatim as the SQL table and alias. Route every table emission (from/join/insertInto/update/deleteFrom) and the composition check through `Style::realName`, while the alias stays the PHP scope name and an `AS` bridges them whenever they differ — including the root table, which returned before the join-path `AS` logic and so could emit `FROM post_tag` against an undefined `postTag` alias for a multi-word root. DSL calls in the tests become PHP-conventional camelCase (post_category -> postCategory); the test schema, columns and seed data stay snake_case. Requires respect/data with Stylable::realName.
1f5b473 to
8977705
Compare
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.
Mapper used the scope name verbatim as the SQL table and alias. Route every table emission (from/join/insertInto/update/deleteFrom) and the composition check through
Style::realName, while the alias stays the PHP scope name and anASbridges them whenever they differ — including the root table, which returned before the join-pathASlogic and so could emitFROM post_tagagainst an undefinedpostTagalias for a multi-word root.DSL calls in the tests become PHP-conventional camelCase (post_category -> postCategory); the test schema, columns and seed data stay snake_case.
Requires respect/data with Stylable::realName.