[]
        
(Showing Draft Content)

Data Behavior Settings

Data behavior settings control how column values are validated, transformed, indexed, and stored after parsing.

Unlike core structure settings, which define identity and type, behavior settings define how the column participates in data operations.

These settings affect:

  • Data integrity

  • Value normalization

  • Record structure transformation

  • Query performance

They operate at the DataManager layer and are independent of any specific view.

required

Marks a column as mandatory when inserting a new record.

columns: {
    name: {
        dataType: "string",
        required: true
    }
}

If a new row is created without a value for a required column, the record is considered invalid.

This constraint applies at the data layer and is not limited to UI validation.

readonly

Prevents a column value from being modified after it is set.

columns: {
    id: {
        dataType: "number",
        readonly: true
    }
}

A readonly column:

  • Cannot be changed through data update operations

  • Still participates in formulas and relationships

Readonly does not prevent the column from being initialized during record creation.

defaultValue

Defines a default value when a new row is inserted.

columns: {
    status: {
        dataType: "string",
        defaultValue: "New"
    }
}

The default value can be:

  • A constant value

  • A formula expression

The default is applied only when the field is not explicitly provided during insertion.

dataPattern

Defines how string values are parsed into typed values.

columns: {
    birthday: {
        dataType: "date",
        dataPattern: "dd/MM/yyyy"
    }
}

Examples of supported parsing scenarios:

  • Date format strings

  • Custom decimal separators

  • Boolean truthy/falsy mappings (for example "Yes|No")

dataPattern affects parsing behavior only.

It does not change how values are stored internally after conversion.

dataMap

Maps stored values to display-friendly values.

columns: {
    product: {
        dataMap: {
            1: "Product-A",
            2: "Product-B"
        }
    }
}

Important:

  • The underlying stored value remains unchanged.

  • The mapping affects view-level data presentation only.

dataMap does not modify table data or alter the original record values.

showNullAs and showEmptyAs

showNullAs and showEmptyAs define how special values are displayed.

columns: {
    Name: {
        showNullAs: "[NULL]",
        showEmptyAs: "[EMPTY]"
    }
}
  • showNullAs specifies the display text for null or undefined values.

  • showEmptyAs specifies the display text for empty string ("") values.

These settings:

  • Affect only how values are displayed

  • Do not modify the underlying stored data

  • Do not change the actual row values

For example, if a record contains:

{ Name: null }

The stored value remains null, but the display value becomes [NULL].

View-Level Override

These properties can also be defined at the view column level.

columns: {
    Name: {
        showNullAs: "[NULL]",
        showEmptyAs: "[EMPTY]"
    }
}

When both schema-level and view-level settings exist:

  • The view-level configuration overrides the schema-level configuration.

  • The schema-level configuration acts as the default behavior for all views.

spread

If a column contains object values, spread expands its properties into separate columns during fetch.

columns: {
    address: {
        spread: true
    }
}

Given data:

{
    id: 1,
    address: {
        city: "Berlin",
        zip: "10000"
    }
}

After fetch, the table structure is expanded to include:

  • address.city

  • address.zip

This transformation occurs at the table level.

Unlike dataMapspread modifies the record structure inside the table after parsing.

indexed

Creates an index for the column after the table is fetched.

columns: {
    customerId: {
        indexed: true
    }
}

When indexing is enabled:

  • A value-to-row mapping structure is created internally

  • Filtering and lookup operations on this column become more efficient

Indexing improves query performance but increases memory usage.

Indexes are built after fetch() completes.

Behavioral Responsibility

Data behavior settings define:

  • Validation constraints

  • Mutability rules

  • Default values

  • Parsing behavior

  • Record structure expansion

  • Performance optimizations

They do not define:

  • Visual formatting

  • UI components

  • Column layout

  • Cross-table presentation

Those capabilities are handled separately in advanced modeling and view configuration.