Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upBring back `SqlLiteral::bind` #1347
Comments
sgrif
added
the
mentoring available
label
Dec 3, 2017
sgrif
added this to the 1.1 milestone
Dec 3, 2017
This comment has been minimized.
|
@sgrif - I'm interested in this after I get some of the documentation / guide issues out of the way. |
sgrif
assigned
notryanb
Dec 5, 2017
sgrif
modified the milestones:
1.1,
1.2
Jan 15, 2018
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
sgrif commentedDec 3, 2017
That method was deprecated when
sql_querywas 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 tosql_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")