-
Notifications
You must be signed in to change notification settings - Fork 40
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
Handle case when SQLStatement passed as parameter. #31
Conversation
Codecov Report
@@ Coverage Diff @@
## master #31 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 1 1
Lines 28 47 +19
=====================================
+ Hits 28 47 +19
Continue to review full report at Codecov.
|
Could you please give me some feedback on this? |
This makes the code a whole lot more complicated and I don't understand what's going on in the constructor. It is also essentially the same semantic as I do see the value for subqueries though, it is a lot nicer than |
Actually, it transforms nested SQLStatements into chain of
Yes, subqueries is the main use-case for that. What should I do to get this merged? Simplify code? (I am really don't know how). Or something else? |
} else { | ||
this.strings = [] | ||
this.values = [] | ||
let prevOpened = false |
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.
What does this mean?
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.
It means that previous value of this.strings
array was created by append
function, and next value of strings
should be appended to previous value of this.strings
, instead of creating new one
Sorry for disturbing, but I want to ping this again up. |
Just took another look at it. |
This PR introduces ability to pass SQLStatement as parameter to other SQLStatement cosntructor.
It could be used as more straighforward alternative to
.append
method.See #30.