Class: Column

Column

Represents a database column.

Constructor

new Column(column)

Initialize the column.
Parameters:
Name Type Description
column Object An object representing the database column. Any custom properties on the object shall be preserved.
Properties
Name Type Attributes Default Description
name string The name of the column.
mapTo string <optional>
column.name When the column is serialized, the resulting object will use this property name.
isPrimary boolean <optional>
false Whether or not this column is a primary key.
converter Object <optional>
{} An optional converter object containing onRetrieve and/or onSave methods. These methods will be called when a column is serialized after a select, and before the column is saved to the database, respectively.
Source:

Methods

(static) createFQColName(tableAlias, colName) → {string}

Create a fully-qualified column name in the form <table-alias>.<column-name>.
Parameters:
Name Type Description
tableAlias string The alias for the table.
colName string The column name.
Source:
Returns:
The fully-qualified column name, unescaped.
Type
string