What's New?
8.5.0
QueryBuilder
Add a
resetmethod to QueryBuilder.Add locking helpers such as
lock,noLock,lockForUpdate, andsharedLock.Correct return aggregate values for date values from
maxandminexecutors.Automatically add a
scaleto an incoming query param when needed.Add a
whereNotLikeshortcut method.Correctly format a
COUNT(DISTINCT column)query.Only use bulk insert syntax when needed in OracleGrammar due to interactions between the
resultparameter tocfquery, Lucee, and the Oracle JDBC driver.
SchemaBuilder
Add support for stored computed columns and virtual computed columns.
8.4.9
Swap
masterbranch tomainbranch.
8.4.8
Remove unnecessary injection for QueryUtils.
8.4.7
Account for raw expressions when generating mementos for comparison
8.4.6
Add support for mediumtext & longtext types for MySQLGrammar.
8.4.5
Fix limit on simplePaginate.
8.4.1 - 8.4.4
Migrate release process to GitHub Actions.
8.4.0
Add a
simplePaginatepagination method for quicker performance when total records or total pages are not needed or too slow.
8.3.0
Introduce a
numericSQLTypesetting to specify the default numeric SQL type.
8.2.2
Default to
htmlfor thedumpformat argument towriteDump.
8.2.1
Correctly use the passed in
strictDateDetectionto theQueryUtils.cfc.
8.2.0
Added a
dumpcommand to aid in debugging a query while chaining.
8.1.0
orderByRawnow can accept bindings.A new, optional
strictDateDetectionsetting is available to check the underlying Java class of a date object instead of usingisDate.
8.0.3
Ignore select bindings for aggregate queries.
Allow spaces in table aliases.
Split FLOAT and DECIMAL column types in SQL Server.
8.0.2
Clear orderBy bindings when calling
clearOrders.
8.0.1
Trim table definitions before searching for aliases. Makes qb more lenient with extra whitespace.
8.0.0
BREAKING CHANGES
whencallbacks now automatically scope and group where clauses when anORcombinator is used.
Other Changes
Combine
clearOrdersandorderBywith a newreordermethod.Clear current selected columns with
clearSelect.Combine
clearSelectand eitherselectorselectRawwithreselectandreselectRawrespectively.
7.10.0
Expose nested where functions to enable advanced query manipulation in downstream libraries like Quick.
7.9.9
Fixes for OracleGrammar including table aliases and wrapped subqueries.
7.9.8
Allow nullable timestamps in MySQL.
7.9.7
Return 0 on null aggregates.
7.9.6
Match type hints to documentation for join functions
7.9.5
Handle enhanced numeric checks with Secure Profile enabled.
7.9.4
Allow raw statements in basic where clauses.
7.9.3
7.9.2
Allow for space-delimited sort directions like
column DESC.valueandvaluesnow work with column formatters.Correctly format RETURNING clauses with column formatters and ignoring table qualifiers.
7.9.1
Handle multi-word columns in
queryRemoveColumns.
7.9.0
Remove elvis operator due to ACF compatibility issues
7.8.0
Add support for MONEY and SMALLMONEY data types to SchemaBuilder.
7.7.3
Fix wrapping of enum types for Postgres.
7.7.2
Compatibility fix for ACF 2018 and
listLastparsing.Include current_timestamp default for
timestampcolumns in SchemaBuilder.Ignore table qualifiers for insert and update.
7.7.1
Fix a bug with preventDuplicateJoins when using the closure syntax with a join.
7.7.0
Add executionTime to the data output from BaseGrammar, including being available in interceptors.
7.6.2
Fix a case where a column was not wrapped correctly when a
whereused a subquery for the value.
7.6.1
Avoid
duplicatefunction due to cbORM / Hibernate bugs when used in the same application.
7.6.0
Split off a private
whereBasicmethod. This is used in Quick to provide extra sql type features.Add a
clearOrdersmethod. Any already configured orders are cleared. Any orders added after this call will be added as normal.selectRawnow can take an array of expressions.
7.5.1
Fixed an issue using column formatters with update and insert.
7.5.0
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.
7.4.0
Enhance order by's with more direction options (c767ac8)
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.
7.3.15
Fix using
whereBetweenwith query param structs (07c9b72)
7.3.14
Ignore orders in aggregate queries (39e1338)
7.3.13
Format with cfformat (dc2a9b6)
7.3.12
Improve column wrapping with trimming (d98a5cb)
Prefer the parent query over magic methods when the parent query has the exact method. (f9fd8d1)
7.3.9, 7.3.10, 7.3.11
Switch to using ForgeBox Storage.
7.3.8
Allow passing query options in to paginate (cdecfb3)
7.3.7
Fix for inserting null values directly (1de27a6)
7.3.5, 7.3.6
Use cfformat for automatic formatting (119e434)
Add a type to the onMissingMethod exception (90d1093)
7.3.4
Correctly wrap comments in
MySQLGrammar.
7.3.2, 7.3.3
Publish qb apidocs to Ortus API Docs.
7.3.1
Fix for null values breaking the new
checkIsActuallyNumericmethod inQueryUtils.
7.3.0
Add a
parameterLimitpublic property toSqlServerGrammar. This property is used in Quick to split up eager loading to work around the 2100 param limit of SQL Server.
7.2.0
Allow a parent query 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 Quick to allow Quick features like scopes to be available inside any closures.
7.1.0
Lambdas (arrow functions) are now allowed wherever closures are allowed.
Add an
orderByRawmethod.
7.0.0
BREAKING CHANGES
Please see the Migration Guide for more information on these changes.
Drop support for Lucee 4.5 and Adobe ColdFusion 11.
MSSQLGrammarrenamed toSqlServerGrammarRemove variadic parameters support in builder functions like
select.The
defaultGrammarmapping needs to be the full WireBox mapping, including the@qb, if needed.For instance,
MSSQLGrammarwould becomeMSSQLGrammar@qb.This will allow for other grammars to be more easily contributed via third party modules.
The argument names of
forPagechanged to match the newpaginatemethod.Add
defaultValueand optional exception throwing tovalue. (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.)
Other Changes
Completely revamped documentation! (You're looking at it right now.)
Add new flag to
toSQL( showBindings = true )to replace question marks (?) withcfqueryparam-compatible structs for debugging.Preserve column case and order when converting a query to an array using the default
"array"return format.Add a new paginate method to generate a pagination struct alongside the results. This can be customized using a custom PaginationCollector.
Allow raw values in
insertcalls.Allow default
queryExecuteoptionsto be configure at a Query Builder level. This also enables customQueryBuildersa la Hyper.Add a
whereLikemethod.Allow closures to be used in left and right joins.
Provide an
addUpdatemethod to programmatically build theSETclause of an update query.Add a new
chunkmethod to grab records from the database in small sets.Add
rawinalterTablesegments.Add
dropAllObjectssupport forSqlServerGrammarandOracleGrammarto supportmigrate freshfrom cfmigrations.Add a
renameTablealias forrename.Remove default constraints when dropping columns with a default on
SqlServerGrammar.Add more column types and column helpers to
SchemaBuilder, including:datetimeTzlineStringnullableTimestampspointpolygonsoftDeletessoftDeletesTztimeTztimestampstimestampTztimestampsTzwithCurrent
6.4.0
Allow Expressions (
query.raw) in update statements.
Last updated
Was this helpful?