BaseField
Abstract base for every "column reference" element — Field,
GroupColumn, OrderColumn, and
ReturningColumn all extend it. It only defines the common shape
(schema/table/field parts plus a couple of optional hints); parsing the source string and
serializing to SQL is left entirely to each subclass.
BaseField cannot be instantiated directly; calling BaseField() or new BaseField() throws a
TypeError ("BaseField is abstract and cannot be instantiated"). You always work with one of its
concrete subclasses.
Constructor
BaseField(): BaseField
new BaseField(): BaseField
Dual-callable, no-argument constructor, guarded against direct instantiation as described above.
A subclass calls it via BaseField.call(this) before parsing its own arguments.
Properties
| Key | Type | Readonly | Description |
|---|---|---|---|
_field | string | No | The unqualified field name (or *). Initialized to '' by the base constructor; subclasses parse and overwrite it. |
_schema | string | undefined | No | Schema qualifier, if the subclass parsed one. |
_table | string | undefined | No | Table qualifier, if the subclass parsed one. |
_dataType | DataType | undefined | No | Optional data type hint (used by Field). |
_isArray | boolean | undefined | No | Optional array-field hint (used by Field). |
_isDataSet | boolean | undefined | No | Declared on the shape but not read or set by any constructor in @sqb/builder itself. |
_descending | boolean | undefined | No | Sort direction hint (used by OrderColumn). |
BaseField does not itself implement _type or _serialize() — every subclass supplies its own.
Methods
BaseField adds no methods beyond the constructor guard; all serialization behavior lives in the
subclasses.