QBGenericColumn

Overview

The QBGenericColumn class represents a generic (untyped) column in a QBSelect query.

For more information about constructing and executing queries and columns, refer to the QBSelect section of this documentation.

Extends

QBColumn

Properties Summarized

Type
Name
Summary

Create abs(column) expression

Create an aggregate average expression.

Create bit_length(column) expression

Create cardinality(column) expression

Create ceil(column) expression

Extract day from date

Create floor(column) expression

Extract hour from date

Compare column with null.

Create length(column) expression

Create lower(column) expression

Create an aggregate max expression.

Create an aggregate min expression.

Extract minute from date

Extract month from date

Create a negated condition.

Create round(column) expression

Extract second from date

Create sqrt(column) expression

Create an aggregate sum expression.

Create trim(column) expression

Create upper(column) expression

Extract year from date

Methods Summarized

Type
Name
Summary

Compare column to a range of 2 values or other columns.

Create coalesce(arg) expression

Divide by value

Compare column with a value or another column.

Compare column with a value or another column.

Compare column with a value or another column.

Compare column with subquery result.

Compare column with values.

Compare column with custom query result.

Compare column with a value or another column.

Compare column with a value or another column.

Compare column with a value or another column.

Create locate(arg) expression

Create locate(arg, start) expression

Compare column with a value or another column.

Subtract value

Create mod(arg) expression

Multiply with value

Create nullif(arg) expression

Create substring(pos) expression

Create substring(pos, len) expression

Properties Detailed

abs

Create abs(column) expression

Type QBColumn a QBColumn representing the absolute value of the column.

Sample

avg

Create an aggregate average expression.

Type QBColumn a QBColumn representing the average aggregate of the column.

Sample

bit_length

Create bit_length(column) expression

Type QBColumn

Sample

cardinality

Create cardinality(column) expression

Type QBColumn

Sample

ceil

Create ceil(column) expression

Type QBColumn a QBIntegerColumn representing the ceil expression for the column.

Sample

day

Extract day from date

Type QBColumn a QBIntegerColumn representing the extraction of the day from a date.

Sample

floor

Create floor(column) expression

Type QBColumn a QBIntegerColumn representing the floor expression for the column.

Sample

hour

Extract hour from date

Type QBColumn a QBIntegerColumn representing the extraction of the hour from a date.

Sample

isNull

Compare column with null.

Type QBCondition a QBCondition representing the "is null" comparison.

Sample

len

Create length(column) expression

Type QBColumn

Sample

lower

Create lower(column) expression

Type QBColumn

Sample

max

Create an aggregate max expression.

Type QBColumn a QBColumn representing the sum aggregate function.

Sample

min

Create an aggregate min expression.

Type QBColumn a QBColumn representing the minimum aggregate function.

Sample

minute

Extract minute from date

Type QBColumn a QBIntegerColumn representing the extraction of the minute from a date.

Sample

month

Extract month from date

Type QBColumn a QBIntegerColumn representing the extraction of the month from a date.

Sample

not

Create a negated condition.

Type QBGenericColumnComparable a QBColumn representing the negated condition.

Sample

round

Create round(column) expression

Type QBColumn a QBIntegerColumn representing the round expression for the column.

Sample

second

Extract second from date

Type QBColumn a QBIntegerColumn representing the extraction of the second from a date.

Sample

sqrt

Create sqrt(column) expression

Type QBColumn a QBNumberColumn representing the square root of the column.

Sample

sum

Create an aggregate sum expression.

Type QBColumn a QBColumn representing the sum aggregate of the column.

Sample

trim

Create trim(column) expression

Type QBColumn

Sample

upper

Create upper(column) expression

Type QBColumn

Sample

year

Extract year from date

Type QBColumn a QBIntegerColumn representing the extraction of the year from a date.

Sample

Methods Detailed

between(value1, value2)

Compare column to a range of 2 values or other columns.

Parameters

Returns: QBCondition a QBCondition representing the "between" comparison for the two values.

Sample

coalesce(value)

Create coalesce(arg) expression

Parameters

  • Object value when column is null

Returns: QBColumn a QBColumn representing the coalesce expression.

Sample

divide(value)

Divide by value

Parameters

Returns: QBColumn a QBNumberColumn representing the column divided by the value.

Sample

eq(value)

Compare column with a value or another column. Operator: equals

Parameters

Returns: QBCondition a QBCondition representing the "equals" comparison.

Sample

ge(value)

Compare column with a value or another column. Operator: greaterThanOrEqual

Parameters

Returns: QBCondition a QBCondition representing the "greater than or equal to" comparison.

Sample

gt(value)

Compare column with a value or another column. Operator: greaterThan

Parameters

Returns: QBCondition a QBCondition representing the "greater than" comparison.

Sample

isin(query)

Compare column with subquery result.

Parameters

Returns: QBCondition a QBCondition representing the "in" comparison with a subquery.

Sample

isin(values)

Compare column with values.

Parameters

  • Array values array of values

Returns: QBCondition a QBCondition representing the "in" comparison with a list of values.

Sample

isin(customQuery, args)

Compare column with custom query result.

Parameters

  • String customQuery custom query

  • Array args query arguments

Returns: QBCondition a QBCondition representing the "in" comparison with a custom query and arguments.

Sample

le(value)

Compare column with a value or another column. Operator: lessThanOrEqual

Parameters

Returns: QBCondition a QBCondition representing the "less than or equal to" comparison.

Sample

like(pattern)

Compare column with a value or another column. Operator: like

Parameters

  • Object pattern the string value of the pattern

Returns: QBCondition the QBCondition that can be added to a where clause

Sample

like(pattern, escape)

Compare column with a value or another column. Operator: like, with escape character

Parameters

  • Object pattern the string value of the pattern

  • Number escape the escape char

Returns: QBCondition the QBCondition that can be added to a where clause

Sample

locate(arg)

Create locate(arg) expression

Parameters

Returns: QBColumn the QBIntegerColumn that can be added to the result.

Sample

locate(arg, start)

Create locate(arg, start) expression

Parameters

Returns: QBColumn the QBIntegerColumn that can be added to the result.

Sample

lt(value)

Compare column with a value or another column. Operator: lessThan

Parameters

Returns: QBCondition a QBCondition representing the "less than" comparison.

Sample

minus(value)

Subtract value

Parameters

Returns: QBColumn a QBNumberColumn representing the column substracted with the value.

Sample

mod(arg)

Create mod(arg) expression

Parameters

Returns: QBColumn a QBColumn representing the modulo of the column.

Sample

multiply(value)

Multiply with value

Parameters

  • Object value nr to multiply with

Returns: QBColumn a QBNumberColumn representing the column multiplied with the value.

Sample

nullif(arg)

Create nullif(arg) expression

Parameters

Returns: QBColumn a QBColumn representing the nullif expression.

Sample

plus(value)

Add up value

Parameters

Returns: QBColumn a QBNumberColumn representing the column added with the value.

Sample

substring(pos)

Create substring(pos) expression

Parameters

Returns: QBColumn the QBTextColumn that can be added to the result.

Sample

substring(pos, len)

Create substring(pos, len) expression

Parameters

Returns: QBColumn the QBTextColumn that can be added to the result.

Sample


Last updated

Was this helpful?