Define a Column
In addition to using loadXml() or database introspection, you can also define a column using the setColumn() method. This can be used for either a physical database column or a relation field.
Arguments (for physical field):
- tablename (required): The name of the table to which this column belongs.
- columnname (required): The name of the column.
- CF_Datatype (required): The CF_SQL_TYPE for the field.
- Length (optional): For string fields, the length of the field.
- Default (optional): The default value for the field.
- Special (optional): The special type of the field, if any.
- PrimaryKey (optional): A boolean indicating whether the field is a primary key field.
- AllowNulls (optional): A boolean indicating whether the field should allow NULL values.
- Precision (optional): For numeric fields, the total number of digits to the left and right of the decimal point (defaults to 12)
- Scale (optional): For non-integer numeric fields, the number of digits to the right of the decimal point (defaults to 2).
- useInMultiRecordsets (optional, default = true): Indicates if this column should be included in recordsets with more than one record when fieldlist is not passed in.
Arguments (for relation field):
- tablename (required): The name of the table to which this column belongs.
- columnname (required): The name of the column.
- Relation (required): A structure defining the relation type.
- useInMultiRecordsets (optional, default = true): Indicates if this column should be included in recordsets with more than one record when fieldlist is not passed in.