-
Notifications
You must be signed in to change notification settings - Fork 275
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
Support update table1, table2, ... query support. Closes #192 #1079
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
f6d7cc1
to
30f1f72
Compare
30f1f72
to
8674b06
Compare
8674b06
to
a7f99fa
Compare
a7f99fa
to
05bd329
Compare
I'm rebasing this to 0.28, but I think that branch is broken. The |
05bd329
to
1f2c879
Compare
Yeah, it was 3 commits behind or something. I forgot to rebase it. |
1f2c879
to
c22d6cf
Compare
Actually, I just accidentally picked up the |
c22d6cf
to
7c19b19
Compare
7c19b19
to
5cff900
Compare
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.
Hey 👋
Overall LGTM as always! 🚀
I left some nitpicky comments..
I wonder if we could make set
's object variant work for this scenario. Was it a type-complexity decision or something else?
I'm afraid that auto-completion would lead postgres etc. users to use the table qualified names even though they only work on mysql. The object version already works for columns that are unambiguous. For example this works: db.updateTable(['person', 'pet'])
.set({ first_name: 'foo', name: 'bar' })
|
5cff900
to
bbc168e
Compare
bbc168e
to
932699c
Compare
Adds support for queries like this:
This kind of queries are supported by (at least) MySQL. As discussed in #192 we can't really make the join methods work with both MySQL and PostgreSQL since postgres joins add tables to the
TB
generic and MySQL would need to add to bothUT
andTB
generics.The
set({ first_name: 'foo' })
version of theset
method doesn't support table qualified references. The users need to use theset('table.column', value)
version.