Switch from table_catalog
to table_schema
when referencing schema for PostgresGrammar
.
CommandBox-friendly injections for SQL Commenter.
Add support for from
bindings, used especially in fromSub
queries.
This release reverts the use of native returntype
s. There are too many bugs between engine implementations to make it viable. No end-user changes should be visible.
Make withReturnFormat
a public method.
Add ability to inline bindings when calling toSQL
and dump
. These strings can be executed in a DBMS application.
Move coldbox
namespace injection to the function body so CommandBox doesn't blow up.
Correctly apply native returntypes after newQuery
and withReturnFormat
.
Fix losing defaultOptions
when calling newQuery
.
Shortcut for no return format using none
.
Allow for native struct returntypes. Requires a return format of none
.
Fix RouteInfoCommenter
file name.
Adobe has ended support for ACF 2016, and so must we.
CFML's uuid
does not match other languages; it's one character shorter. Because of this, the value from createUUID()
cannot be used in some database column types like SQL Server's uniqueidentifier
. This made for some confusion in SchemaBuilder since it wasn't clear if uuid
meant CFML's definition or the wider world's definition.
So, the types have been split, following Lucee's pattern, into uuid
(matching CFML's createUUID()
) and guid
(matching Java's UUID or createGUID()
on Lucee).
Popular grid frameworks like Quasar and Datatables use values of 0 or -1 to return all rows from a query. This is now supported in qb. Previously, it generated an invalid query (SELECT * FROM users LIMIT 0 OFFSET 0
).
This behavior can be customized by providing a callback to the shouldMaxRowsOverrideToAll
setting or init
argument. For instance, to revert to the previous behavior you would set the function as follows:
autoDeriveNumericType
is now the defaultIntroduced in 8.10.0, this feature uses separate SQL types for integers and decimals to increase performance in certain database grammars. This feature is now the default, but the previous behavior can be enabled by setting autoDeriveNumericType
to false
.
Note: the option to revert to the old behavior will be removed in the next major version.
strictDateDetection
is now the defaultIntroduced in 8.1.0, this feature only returns a SQL type of CF_SQL_TIMESTAMP
if the param is a date object, not just a string that looks like a date. This helps avoid situations where some strings were incorrectly interpreted as dates. For many, the migration path is straightforward — calls to now()
are already date objects as well as any function that operates on a date. If you need to parse a string as a date, the parseDateTime
built-in function can accomplish that.
Note: the option to revert to the old behavior may be removed in the next major version.
Thanks to Jason Steinhouer, qb now supports SQLite for both QueryBuilder
and SchemaBuilder
. You can use it in your apps by specifying SQLiteGrammar@qb
as the default grammar.
sqlCommenter is a specification by Google for adding contextual information as a comment at the end of a SQL statement. This can give insights into your application, especially when diagnosing slow queries. Examples of the information you can append to your queries are route
, handler
, action
, version
, and others, as well as the ability to add your own, such as loggedInUser
and more.
There's a new shortcut method to return qb.sum( qb.raw( expression ) )
. You're welcome. 😉
dropIndex
methodSome grammars, like SQL Server, do not treat simple indexes as constraints. For this reason, we've added a dropIndex
method alongside the existing dropConstraint
.
columnList
helper methodcolumnList
will return either an array of column names for the configured table or the query that is generated by cfdbinfo
for the configured table. Especially useful when working with dynamically generated grids.
Correctly compile insertUsing
statements that use Common Table Expressions (CTEs).
Update announceInterception
calls for ColdBox 7. (Thank you, Michael Born.)
Fixed