|
Next: dominant
columnIn Andromeda a column is defined outside of a table and then placed into one or more tables. The top-level column definition establishes a name and (at minimum) a type_id for a column. Once a column is defined, it can go into any number of tables. Example
column column_id: # required descripton: string type_id: ( char, vchar, int...) # optional colprec: numeric colscale: numeric automation_id: ( FETCH, DISTRIBUTE, SUM ... ) auto_formula: table.column value_min: value_max: uiro: Y/N uino: Y/N uicols: numeric uirows: numeric required: Y/N dispsize: numeric uiwithnext: Y/N alltables: Y/N A column name is unique in a database. You cannot have two columns with the same name in different tables that have different type, precision or scale. (Technically this can be subverted using the table.column#prefix and table.column#suffix properties, but sound naming conventions generally avoid that). Columns are placed into tables using the table.column or table.foreign_key definitions. Propertiescolumn column_id:. The first line of a column definition begins with the keyword 'column', a space, and then the unique column name (column_id) followed by a colon. The first line of the definition should not be indented. Each line that follows the definition contains exactly one property/value assignment. All of the property/value assignments must be indented, and they must all be indented at the same level. The bare minimum of properties are type_id and description. description. The description of the column that will be used in the UI for labels, captions, documentation, errors, and so forth. type_id. The column type. Column types are:
colprec. Column Precision. Length of column in characters. Required for types char, vchar, and numb. colscale. Column Scale, used only for type numb, the number of digits to the right of the decimal. If a table has colprec 6 and colscale 3, then its highest positive value is 999.999. automation_id. (See also Automations, table.column.chain and table.upsave). Specifies one of the simple automated or default formulas for a column.
auto_formula. See also Automations. Reqired by some values of automation_id.
value_min. The minimum allowed value for the column. value_max. The maximum allowed value for the column. uiro. A Y/N flag to make this column read-only on the UI. This is NOT a security measure, it should be used only for convenience and should be considered subvertible by an attacker. uino. A Y/N flag to suppress the column completely from the UI. This is NOT a security measure, it should be used only for convenience and should be considered subvertible by an attacker. uicols. A column of type_id 'text' will be displayed onscreen using an HTML TEXTAREA element. The properties uicols and uirows control the row and column sizing of that element. The defaults are 4 and 30. uirows. See uicols above. required. A Y/N flag indicating that a non-empty value is required. dispsize. An explicit setting of display size in characters, which overrides the framework's calculation of a suitable display size. For instance, a char column of colprec: 10 will display as 11. You can override that to 5 to make it smaller. uiwithnext. An experimental UI flag that applies to default input screens. On a normal default screen the input fields are displayed one to a line, one after another. If this flag is set, the next input field will actuall occur on the same line. Given two columns named "state" and "zip" you might set 'uiwithnext: "Y"' on "state". alltables. A flag which causes the column to automatically be placed into all tables in the database. Obviously should be used with caution! The framework defines three columns that have this flag set, being skey, _agg, and skey_quiet.
Next: dominant
|
