custom static method

QSelectField custom(
  1. String sql
)

Creates a custom SQL expression as a selectable field.

sql The raw SQL expression string.

Returns a QSelectField containing the custom SQL.

Example:

var custom = SQL.custom('SUM(price * quantity)'); // SUM(price * quantity)

Implementation

static QSelectField custom(String sql) {
  return QMath(sql);
}