-
Notifications
You must be signed in to change notification settings - Fork 370
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
Add a RAW JOIN source to the query #163
Conversation
@moiseevigor, I'm trying to understand your proposal. Can you give an example? |
Hi! Here is the example https://github.com/moiseevigor/onelife-slim/blob/master/app/models/UserCountries.php#L38 The theory comes from correlated subquery I suppose: http://en.wikipedia.org/wiki/Correlated_subquery |
So, why is this better than |
Oh, I understand now... Thanks! @tag, if you use |
@lrlopez Thank you! By the way if you have a list of apps using Idirom the Onelife is heavely depending on ;)
|
Just noticed that certainly this pull request lacks the parameter part |
Unfortunately it is also missing tests and documentation. Do you have the time to update the pull request with the parameter binding, tests and documentation? |
I'll try to complete it these days. |
I like the look of the way this is going. Do you think you'll be able to have something ready for January? |
Hi, it is in my weekend roadmap for a month now. I've seen this issue in a 1.5.0 milestone due in 2 months. I'll certainly will come back to you with either result in a week from now ... Thanks! |
Let's try this one. Let me know if it works for you. |
$table .= " {$table_alias}"; | ||
} | ||
|
||
$this->_values = $parameters; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks too crude, and I think it breaks when multiple raw_joins are presents and maybe in other cases. So maybe we need to make merge but with index shift.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me know how you get on with this.
2. Test multiple raw joins
@treffynnon Now should work with multiple raw_joins. Added one more test for that. |
Merged into develop, thanks. Please could I have some help with testing @tag @lrlopez @moiseevigor |
Hi, I've added the
raw_join
function to the idiorm class. I find it very useful on optimizing the query and selecting the extra data from composite tables. Let me know if you find it appropriate, it actually copy/pasted version of the function_add_join_source
without distinction between$join_operator
and$table
and skiping the_quote_identifier
.