Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fixBug: Conditional Stacked Functions in selecting #180

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Feb 2, 2020

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
Contributor Author

@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 Files Coverage Δ Complexity Δ
lib/Database.php 78.57% <100%> (ø) 17 <13> (+5) ⬆️
lib/Database/ez_sqlsrv.php 74.35% <0%> (ø) 65% <0%> (ø) ⬇️
lib/Config.php 92.42% <0%> (ø) 34% <0%> (ø) ⬇️
lib/ezFunctions.php 77.12% <0%> (+2.61%) 0% <0%> (ø) ⬇️
lib/ezQuery.php 75.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.

@TheTechsTech TheTechsTech merged commit ec214bc into ezSQL:master Feb 2, 2020
@dpDesignz dpDesignz deleted the table-joins branch February 2, 2020 13:23
Sign up for free to 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