Skip to content

Query building #26

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

Closed
dizlexik opened this issue Jan 25, 2020 · 2 comments
Closed

Query building #26

dizlexik opened this issue Jan 25, 2020 · 2 comments

Comments

@dizlexik
Copy link

Is there any plan to add query building functionality to this whereby I could build a query dynamically bit by bit before executing it? Or should I use another library for that sort of thing and call sql.unsafe(queryBuilderResult)?

And a related question, is it possible to build a dynamic query in a manner similar to this?

const query = sql`SELECT * FROM my_table ${order && sql`ORDER BY ${order}`}`;

I know code snippet is nonsense, but hopefully you get the idea.

@porsager
Copy link
Owner

Hi @dizlexik ..

Yeah, I'd like to improve on the helpers already there now so you can achieve exactly something like what you're requesting. I've got a few other things I'll finish first, but it shouldn't be long :)

@porsager
Copy link
Owner

porsager commented Feb 4, 2020

I'm moving the tracking of all this to #12 ;)

@porsager porsager closed this as completed Feb 4, 2020
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

No branches or pull requests

2 participants