The define API is used to declare fields that you will be using in your programs.
Parameters
- Field name (string)
- Config (object)
Config object
A config object is required when defining all fields. It what gives your field attributes, like length, decimal places, dimensions, etc. Available means the element is optioned.
Element name | Description |
---|---|
type | There are the following types available in Profound.js
Some config elements only apply to certain types. |
length | Required on types other than
|
decimals | Required on types
|
varying | Available to char type. |
initValue | Available to all data types. |
dim | Available to all data types. Using dim makes your field into an array. Arrays are 1-indexed. |
orderby | Available to all types when dim element is used, |
elements | Required when using data-structure type. Read about data-structures below. |
special | ??? |