Skip to content
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

feat: Add dynamic query builder #1120

Closed

Conversation

anitnilay20
Copy link

@anitnilay20 anitnilay20 commented Mar 18, 2021

Issue: #291

Trying out few implementation, its in a very early stage.

@anitnilay20 anitnilay20 marked this pull request as draft March 18, 2021 14:55
* Implement simple select statement having all (asterisk) field and table with alias and db name.

* Add Structure for select query.
@mehcode
Copy link
Member

mehcode commented Apr 9, 2021

That issue might be framed badly. We do not currently have any intention of ever adding a complete SQL query builder to SQLx. The issue is talking about what a query builder library could use to operate in the abstract.

The goals of this query builder should be:

  • Sanitization
  • Quoting
  • Placeholder generation ( $1, $2 for postgres or @p1 for mssql, etc. )

Think https://docs.diesel.rs/master/diesel/query_builder/trait.QueryBuilder.html rather than https://github.com/Masterminds/squirrel

The end goal of such a type would be to ease a task such as a version of Diesel with the back-end being SQLx.

@mehcode mehcode closed this Apr 9, 2021
@anitnilay20 anitnilay20 deleted the feature/query-builder branch April 12, 2021 06:52
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.

2 participants