Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The define API is used to declare fields that you will be using in your programs.

Parameters
  1. Field name (string)
  2. 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 nameDescription
type

There are the following types available in Profound.js

  • packed decimal
  • decimal
  • integer
  • unsigned integer
  • char
  • boolean
  • date
  • time
  • timestamp
  • pointer
  • data-structure

Some config elements only apply to certain types.

length

Required on types other than

  • date
  • time
  • timestamp
  • pointer
decimals

Required on types

  • Packed decimal
  • Decimal
varyingAvailable to char type.
initValueAvailable to all data types.
dimAvailable to all data types. Using dim makes your field into an array. Arrays are 1-indexed.
orderbyAvailable to all types when dim element is used,
elementsRequired when using data-structure type. Read about data-structures below.
special???