DbQueryColumn - do-/node-doix-db GitHub Wiki

DbQueryColumn is a class representing a column present in the DbQuery's SELECT, WHERE or ORDER BY clauses.

Properties

Name Type Description
query DbQuery The query this column is selected by
sql String The expression to be selected (left to the AS keyword in the SELECT clause)
alias String The name of this column in the resulting dataset (right to the AS keyword in the SELECT clause)
qName String Copy of alias, safely quoted for interpolation in SQL
desc Boolean If true and this column is included in the DbQuery's order list, the corresponding sql in the ORDER BY will be followed by the DESC keyword.

Constructor

const myColumn = new DbQueryColumn (myQuery, 'NOW()', 'time_stamp')

For DbRelation columns described in the DbModel, the DbColumn.toQueryColumn convenience method is provided.