QBResult
Property Summary
Type | Name | Summary |
---|---|---|
Get/set the distinct flag for the query.. | ||
Get query builder parent table clause, this may be a query or a join clause.. | ||
Get query builder parent.. |
Methods Summary
Type | Name | Summary |
---|---|---|
Add an aggregate to the query result.. | ||
Add an aggregate with alias to the query result.. | ||
Add a column to the query result.. | ||
Add a column with alias to the query result.. | ||
Add all columns from a query or a join to the query result.. | ||
Add a function result to the query result.. | ||
Add a function with alias result to the query result.. | ||
Add a case searched expression to the query result.. | ||
Add a case searched expression with alias to the query result.. | ||
Add the tables' primary pk columns in alphabetical order to the query result.. | ||
Add a query to the query result.. | ||
Add a query with alias to the query result.. | ||
Add a custom subquery to the query result.. | ||
Add a custom subquery with alias to the query result.. | ||
Add a value to the query result.. | ||
Add a value with an alias to the query result.. | ||
Clear the columns in the query result.. | ||
returns an array with all the columns that will be in the select of this query.. | ||
remove a column from the query result.. | ||
Remove a column by name from the query result.. |
Properties Details
distinct
Get/set the distinct flag for the query.
Returns Boolean
Sample
parent
Get query builder parent table clause, this may be a query or a join clause.
Returns QBSelect
Sample
root
Get query builder parent.
Returns QBSelect
Sample
Methods Details
add(aggregate)
Add an aggregate to the query result.
Parameters QBColumn aggregate the aggregate to add to result
Returns QBResult
Sample
add(aggregate, alias)
Add an aggregate with alias to the query result.
Parameters QBColumn aggregate the aggregate to add to result String alias aggregate alias
Returns QBResult
Sample
add(column)
Add a column to the query result.
Parameters QBColumn column column to add to result
Returns QBResult
Sample
add(column, alias)
Add a column with alias to the query result.
Parameters QBColumn column column to add to result String alias column alias
Returns QBResult
Sample
add(columns)
Add all columns from a query or a join to the query result.
Parameters QBColumns columns columns to add to result
Returns QBResult
Sample
add(func)
Add a function result to the query result.
Parameters QBColumn func the function to add to the result
Returns QBResult
Sample
add(func, alias)
Add a function with alias result to the query result.
Parameters QBColumn func the function to add to the result String alias function alias
Returns QBResult
Sample
add(qcase)
Add a case searched expression to the query result.
Parameters QBColumn qcase The searched case expression.
Returns QBResult
Sample
add(qcase, alias)
Add a case searched expression with alias to the query result.
Parameters QBColumn qcase The searched case expression. String alias function alias
Returns QBResult
Sample
addPk()
Add the tables' primary pk columns in alphabetical order to the query result.
Returns QBResult
Sample
addSubSelect(query)
Add a query to the query result.
Parameters QBSelect query query to add to result
Returns QBResult
Sample
addSubSelect(query, alias)
Add a query with alias to the query result.
Parameters QBSelect query query to add to result String alias result alias
Returns QBResult
Sample
addSubSelect(customQuery, args)
Add a custom subquery to the query result.
Parameters String customQuery query to add to result Array args arguments to the query
Returns QBResult
Sample
addSubSelect(customQuery, args, alias)
Add a custom subquery with alias to the query result.
Parameters String customQuery query to add to result Array args arguments to the query String alias result alias
Returns QBResult
Sample
addValue(value)
Add a value to the query result.
Parameters Object value value add to result
Returns QBResult
Sample
addValue(value, alias)
Add a value with an alias to the query result.
Parameters Object value value add to result String alias value alias
Returns QBResult
Sample
clear()
Clear the columns in the query result.
Returns QBResult
Sample
getColumns()
returns an array with all the columns that will be in the select of this query. can return empty array. Then the system will auto append the pk when this query is used.
Returns Array An array of QBColumn thats in the select of this query.
Sample
remove(column)
remove a column from the query result.
Parameters QBColumn column column to remove from the result
Returns QBResult
Sample
remove(name)
Remove a column by name from the query result.
Parameters String name name or alias of column to remove from the result
Returns QBResult
Sample
Last updated