when
control flow function, you were fully responsible for the wrapping of your where statements. For example, the following query:OR
can short circuit the active
check.LIKE
statements in parenthesis. This is done in qb using a function callback to where
.when
control flow function, it was easy to miss this. This is because you are already in a closure - it looks the same as when using where
to group the clauses.when
will automatically group added where clauses when needed. That means our original example now produces the SQL we probably expected.OR
combinator. In these cases no grouping is added.when
callback, nothing changes. Your code works as before. The OR
combinator check only works on the top most level of added where clauses.when
callback, nothing changes from qb 7.withoutScoping
flag to the when
callback.MSSQLGrammar
was visually too close to MySQLGrammar
and was hard to differentiate quickly. SqlServerGrammar
is much more unique and easily identifiable. Additionally, more people that use this library refer to their database engine as "SQL Server" than "MSSQL".MSSQLGrammar
with SqlServerGrammar
. Make sure to also append the @qb
namespace, if needed, as explained below.​select
.defaultGrammar
was used to look up a mapping in the @qb
namespace. This made it difficult to add or use grammars that weren't part of qb. (You could get around this be registering your custom grammar in the @qb
namespace, but doing so seemed strange.)defaultGrammar
to be the full WireBox mapping in your moduleSettings
:defaultValue
parameter and optional exception throwing was added to value
. This pushed the options
struct to the end of the method. If you are using positional parameters with value
, you will need to update your method calls to either use named parameters or the new positions.callback
to query
callback
argument to query
in the following cases:whereSub
whereInSub
whereExists
orWhereExists
whereNotExists
andWhereNotExists
orWhereNotExists
whereNullSub
orderBySub
subSelect
v5.0.0
brings support for SchemaBuilder
inside qb
. To avoid naming confusion, Builder
was renamed to QueryBuilder
. Any references in your code to [email protected]
need to be updated to [email protected]
.