Query Options
Last updated
Was this helpful?
Last updated
Was this helpful?
Each query execution method allows for the passing of an options struct. This is the same struct you would pass to .
qb allows you to specify default options when creating the QueryBuilder instance using the defaultOptions
argument. You can combine this with WireBox to create custom QueryBuilder instances pointing to different datasources and even different grammars.
In Application.cfc
you can specify your default datasource which will be used by qb. If you want to retrieve data from other datasources you can specify this in all retrieval functions by using the extra options parameter such as:
If you also want to use a non-default SQL Grammar you have to specify this when creating your QueryBuilder
.