What's New?
Last updated
Was this helpful?
Last updated
Was this helpful?
Better parsing of raw statements when deriving columns.
Insert data based off of a callback or builder using .
Insert data ignoring duplicate key errors using .
Use a callback or builder as the source for an statement.
Allow for deleting unmatched source records in (SQL Server only).
Add a new skipLocked
flag to .
Don't uppercase quoted aliases in Oracle.
Fix for aliases in update statements.
Don't sort columns for insertUsing
.
Add subquery bindings in insert and upsert statements.
Maintain column order when using source in upsert.
Fix for Oracle returning custom column types when renaming a column.
Explicit arguments scoping.
arrayEach
is slow compared to merging arrays.
Fix wheres with joins in update statements.
Add better null handling to inferSqlType
.
Correctly format columns being updated.
Correctly wrap CTE expressions with parenthesis when required in certain grammars.
Correct return aggregate values for date values from max
and min
executors.
Correctly format a COUNT(DISTINCT column)
query.
Only use bulk insert syntax when needed in OracleGrammar due to interactions between the result
parameter to cfquery
, Lucee, and the Oracle JDBC driver.
Swap master
branch to main
branch.
Remove unnecessary injection for QueryUtils.
Account for raw expressions when generating mementos for comparison
Migrate release process to GitHub Actions.
Add a simplePaginate
pagination method for quicker performance when total records or total pages are not needed or too slow.
Default to html
for the dump
format argument to writeDump
.
Correctly use the passed in strictDateDetection
to the QueryUtils.cfc
.
Ignore select bindings for aggregate queries.
Allow spaces in table aliases.
Split FLOAT and DECIMAL column types in SQL Server.
Clear orderBy bindings when calling clearOrders
.
Trim table definitions before searching for aliases. Makes qb more lenient with extra whitespace.
Expose nested where functions to enable advanced query manipulation in downstream libraries like Quick.
Fixes for OracleGrammar including table aliases and wrapped subqueries.
Handle enhanced numeric checks with Secure Profile enabled.
Allow raw statements in basic where clauses.
Handle multi-word columns in queryRemoveColumns
.
Remove elvis operator due to ACF compatibility issues
Compatibility fix for ACF 2018 and listLast
parsing.
Ignore table qualifiers for insert and update.
Fix a bug with preventDuplicateJoins when using the closure syntax with a join.
Add executionTime to the data output from BaseGrammar, including being available in interceptors.
Fix a case where a column was not wrapped correctly when a where
used a subquery for the value.
Avoid duplicate
function due to cbORM / Hibernate bugs when used in the same application.
Split off a private whereBasic
method. This is used in Quick to provide extra sql type features.
Fixed an issue using column formatters with update
and insert
.
Using a new preventDuplicateJoins
setting in the module settings, qb can detect duplicate joins and ignore them. This is especially useful in a heavily filtered and dynamic query where you may or may not need the join at all or more than one column may need the same join. preventDuplicateJoins
defaults to false
, so it is opt-in. It may be turned on by default in a future breaking release of qb.
You can now use two shortcut methods: orderByAsc
and orderByDesc
. Additionally, orderBySub
or using orderBy
with a closure or builder instance will respect the direction argument.
Fix for null values breaking the new checkIsActuallyNumeric
method in QueryUtils
.
Add a parameterLimit
public property to SqlServerGrammar
. This property is used in Quick to split up eager loading to work around the 2100 param limit of SQL Server.
Lambdas (arrow functions) are now allowed wherever closures are allowed.
Drop support for Lucee 4.5 and Adobe ColdFusion 11.
MSSQLGrammar
renamed to SqlServerGrammar
Remove variadic parameters support in builder functions like select
.
The defaultGrammar
mapping needs to be the full WireBox mapping, including the @qb
, if needed.
For instance, MSSQLGrammar
would become MSSQLGrammar@qb
.
This will allow for other grammars to be more easily contributed via third party modules.
The argument names of forPage
changed to match the new paginate
method.
Add defaultValue
and optional exception throwing to value
. (This changed the argument order.)
All methods that could conceivably take a subquery as well as a value now accept a closure or another builder instance to use as a subquery. (This changed the argument names in some instances.)
Completely revamped documentation! (You're looking at it right now.)
Preserve column case and order when converting a query to an array using the default "array"
return format.
Allow closures to be used in left and right joins.
Add raw
in alterTable
segments.
Add dropAllObjects
support for SqlServerGrammar
and OracleGrammar
to support migrate fresh
from cfmigrations.
Add a renameTable
alias for rename
.
Remove default constraints when dropping columns with a default on SqlServerGrammar
.
Add more column types and column helpers to SchemaBuilder
, including:
datetimeTz
lineString
nullableTimestamps
point
polygon
softDeletes
softDeletesTz
timeTz
timestamps
timestampTz
timestampsTz
withCurrent
****
Add an method. upsert
can update or insert multiple records at once depending on if a column is matched.
Allow expressions in and . Also add a and helper method to make that pattern more ergonomic.
Allow . (This is not supported on Oracle.)
Allow using closures or builder instances.
Better handling of and clauses in queries.
Allow any value to be returned from including strings, numbers, and dates.
Provide default values for and if no records are returned.
Test in CI with support.
SchemaBuilder
can now be configured with . (Default options will still be overridden by options passed to each SchemaBuilder
method.)
Add a method to QueryBuilder.
Add helpers such as , , , and .
to an incoming query param when needed.
Add a shortcut method.
Add support for and .
Add support for & types for MySQLGrammar.
Fix limit on .
Introduce a setting to specify the default numeric SQL type.
📹
Added a command to aid in debugging a query while chaining.
📹
`` now can accept bindings.
A new, optional setting is available to check the underlying Java class of a date object instead of using isDate
.
📹
`` callbacks now automatically scope and group where clauses when an OR
combinator is used.
Combine and orderBy
with a new method.
Clear current selected columns with .
Combine and either or with and respectively.
Allow nullable in MySQL.
Return 0 on null .
Match type hints to documentation for functions
Passed along the options struct to the method when calling .
Allow for space-delimited directions like column DESC
.
Add helpful message when trying to use a closure with instead of .
`` and now work with
Correctly format RETURNING clauses with and ignoring table qualifiers.
Add support for and data types to .
Fix wrapping of types for Postgres.
Include current_timestamp default for columns in SchemaBuilder.
Add a method. Any already configured orders are cleared. Any orders added after this call will be added as normal.
now can take an array of expressions.
Enhance order by's with more direction options ()
Fix using whereBetween
with query param structs ()
Ignore orders in aggregate queries ()
Format with cfformat ()
Improve column wrapping with trimming ()
Prefer the parent query over magic methods when the parent query has the exact method. ()
Switch to using .
Allow passing query options in to paginate ()
Fix for inserting null values directly ()
Use cfformat for automatic formatting ()
Add a type to the onMissingMethod exception ()
Correctly wrap in MySQLGrammar
.
Publish qb apidocs to .
Allow a to be set. A parent query will receive any method calls that are not found on the Query Builder instance. This is especially useful for instances like to allow Quick features like scopes to be available inside any closures.
Add an method.
Allow for fully-qualified column names (table_name.column.name
) in the and methods.
Please see the for more information on these changes.
Add new flag to to replace question marks (?
) with cfqueryparam
-compatible structs for debugging.
Add a new method to generate a pagination struct alongside the results. This can be customized using a custom .
Allow raw values in calls.
Allow to be configure at a Query Builder level. This also enables custom QueryBuilders
a la .
Add a method.
Provide an method to programmatically build the SET
clause of an update query.
to grab records from the database in small sets.