-
Notifications
You must be signed in to change notification settings - Fork 2
DbQueryColumn
do- edited this page Feb 12, 2023
·
5 revisions
DbQueryColumn is a class representing a column present in the DbQuery's SELECT, WHERE or ORDER BY clauses.
| 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. |
const myColumn = new DbQueryColumn (myQuery, 'NOW()', 'time_stamp')For DbRelation columns described in the DbModel, the DbColumn.toQueryColumn convenience method is provided.