This PR changes the behavior of the where clause to support the OR operator. The alias builder.and("...") was removed in favor of the builder.where_clause("...").
How to migrate
You will have to replace all use of the builder.and("...") to builder.where_clause("...")
New features
Was added in the Select, Update and Delete builders the method builder.where_or("...") to support concatenations using the OR operator.
use sql_query_builder as sql;
let query = sql::Select::new()
.select("*")
.from("users")
.where_clause("login = 'joe'")
.where_or("login = 'max'")
.as_string();
SELECT *
FROM users
WHERE
login = 'joe'
OR login = 'max'
Breaking changes
This PR changes the behavior of the where clause to support the
OR
operator. The aliasbuilder.and("...")
was removed in favor of thebuilder.where_clause("...")
.How to migrate
You will have to replace all use of the
builder.and("...")
tobuilder.where_clause("...")
New features
Was added in the Select, Update and Delete builders the method
builder.where_or("...")
to support concatenations using theOR
operator.