qb
qb copied to clipboard
Fluent Query Builder for CFML
On the following page I believe the module settings struct key should be defaultReturnFormat instead of just returnFormat https://qb.ortusbooks.com/query-builder/options-and-utilities/return-format
The following code yields this error on SQL Server: `Incorrect syntax near the keyword 'AS' - ALTER TABLE [rpt].[afterTaxBase] ALTER COLUMN [taxAlpha] AS ((portAfterTax-benchAfterTax)-(portPreTax-benchPreTax)) PERSISTED` schema.alter( "rpt.afterTaxBase", function( table )...
The following code yields an error: `Incorrect syntax near '*'` ``` qb.from('mars_in_tamarac t') .join('veritiadmin.dbo.accounts a', 't.account_id', 'a.portfolioCode') .selectRaw('a.id as accountID,account_id,openDate,closeDate,description,costBasis,quantity,proceeds,realizedGainLoss,stgl,ltgl') .where('closeDate', '
In semi-hairy queries like the one below, the group by clause causes pagination to fail because the "count(*) as aggregate" to figure out page lengths returns more than one row....
We've ran in to two bugs with including the `result` each time - once in `PostgresGrammar` and once in `OracleGrammar`. Although we shouldn't need to worry about it, we want...
I seem to type .newQuery() for every query I write. It would be lovely if newQuery() was the norm, so one could skip that, and maybe add useExisting() for those...
The following code gives the following error. It used to be a tinyint with a default constraint. ``` schema.alter( "mars_in_wash_sales", function( table ) { table.modifyColumn( "shares", table.smallinteger( "shares").default(-999) ); }...
See these two similar query scopes on a Quick entity: ``` function scopeActiveSeasons( qb, includeRegistration = true ) { var adjTime = dateAdd( 'h', application.timeOffset, now() ); return qb .forClient()...
I find myself constantly breaking up large inserts or updates. As a convenience feature, it would be nice to have this automated. I would like to updateorinsert 1000 records at...
I'm trying to create indexes via both schema.create() and schema.alter() and neither are appearing in SQL Server. I don't even see attempts in fusion reactor. In this case I want...