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

Bring back `SqlLiteral::bind` #1347

Closed
sgrif opened this Issue Dec 3, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@sgrif
Member

sgrif commented Dec 3, 2017

That method was deprecated when sql_query was added, and subsequently removed in 1.0. The interface it provided was impossible to use safely on PG or Oracle. While most places that were using it were probably able to migrate to sql_query, it's still a useful method to have. However, for it to be safe to embed elsewhere in the query builder, it needs to also be responsible for adding the bind SQL. For example, sql("id > ? AND name != ?").bind::<Integer, _>(1).bind::<Text, _>("Sean") should become: sql("id > ").bind::<Integer, _>(1).sql(" AND name != ").bind::<Text, _>("Sean")

@sgrif sgrif added this to the 1.1 milestone Dec 3, 2017

@notryanb

This comment has been minimized.

Contributor

notryanb commented Dec 5, 2017

@sgrif - I'm interested in this after I get some of the documentation / guide issues out of the way.

@sgrif sgrif modified the milestones: 1.1, 1.2 Jan 15, 2018

@sgrif sgrif closed this in #1537 Mar 26, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment