Skip to content

Conversation

@dpDesignz
Copy link
Contributor

Fixes#174
Removed check for $columnFields being empty, and added dots between table and column names in the query builder.
Also, fixed a couple of phpunit depreciation warnings.

Added the ability to set a $tableAs for joins if the left table is the same as the right table. Will default to the right table name if not set.
Fixed issue where the right table in $onCondition needed to match $tableAs if it was set.
Updated the examples for the different joins to reflect the new `$tableAs` variable in the functions
Missed a new line on the last commit. Also missed a param in the joining query description and some psr-2 changes. Also found an issue with $condition being used in $onCondition not being consistent.
Changed $condition back to `=` in first and last $onCondition as wasn't meant to be changed.
Update ezSQL for new fixes
To include `leftJoin()` phpunit testing and also fix a couple of phpunit depreciation warnings.
@dpDesignz
Copy link
ContributorAuthor

@techno-express ok, I finally got around to writing a phpunit test. Let me know if you're happy with this. It passes when I run it. 😄

@codecov-io
Copy link

codecov-io commented Feb 2, 2020

Codecov Report

Merging #180 into master will increase coverage by 1.34%.
The diff coverage is 100%.

Impacted file tree graph

@@ Coverage Diff @@## master #180 +/- ## ============================================ + Coverage 83.56% 84.91% +1.34% - Complexity 788 793 +5  ============================================ Files 14 14 Lines 2002 2002 ============================================ + Hits 1673 1700 +27 + Misses 329 302 -27
Impacted FilesCoverage ΔComplexity Δ
lib/Database.php78.57% <100%> (ø)17 <13> (+5)⬆️
lib/Database/ez_sqlsrv.php74.35% <0%> (ø)65% <0%> (ø)⬇️
lib/Config.php92.42% <0%> (ø)34% <0%> (ø)⬇️
lib/ezFunctions.php77.12% <0%> (+2.61%)0% <0%> (ø)⬇️
lib/ezQuery.php75.15% <0%> (+4.88%)204% <0%> (ø)⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e73a3de...6ece68e. Read the comment docs.

@TheTechsTechTheTechsTech merged commit ec214bc into ezSQL:masterFeb 2, 2020
@dpDesignzdpDesignz deleted the table-joins branch February 2, 2020 13:23
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Conditional Stacked Functions in selecting

3 participants

@dpDesignz@codecov-io@TheTechsTech