@squidcloud/client
    Preparing search index...

    Interface TopLevelPropertySchema

    A field at the top level of a collection, including database-related metadata.

    interface TopLevelPropertySchema {
        applyDefaultValueOn?: "always" | "empty" | "updateOrEmpty";
        dataType?: string;
        default?: "__SQUID_SERVER_TIMESTAMP__";
        description?: string;
        enumValues?: string[];
        hidden?: boolean;
        isDate?: boolean;
        isGenerated?: boolean;
        isJSON?: boolean;
        items?: PropertySchema;
        patternProperties?: Record<string, PropertySchema>;
        primaryKey?: boolean;
        properties?: Record<string, PropertySchema>;
        required?: string[];
        type?: string | string[];
    }

    Hierarchy (View Summary)

    Index
    applyDefaultValueOn?: "always" | "empty" | "updateOrEmpty"

    When default applies (default to 'empty'): 'always' - no matter what the client sent, both on update and insert. 'empty' - only if the value of the field is empty (undefined). 'updateOrEmpty' - no matter what the client sent, updating the record uses the default value.

    dataType?: string

    The database data type that is represented by this property. This is often different from the actual property type, with is a Javascript primitive. For example, for a SMALLINT the dataType would be 'smallint', but the type would be 'integer'.

    default?: "__SQUID_SERVER_TIMESTAMP__"

    Has the server write the time of the mutation into the field.

    description?: string

    What the field holds, in words.

    enumValues?: string[]

    The only values the database takes in this field.

    hidden?: boolean

    This indicates that although the field exists on the db, it should be ignored by squid.

    isDate?: boolean

    Whether the value is a date.

    isGenerated?: boolean

    Whether the database computes this field itself, so a write that names it fails.

    isJSON?: boolean

    Whether the value is JSON.

    The element of an array.

    patternProperties?: Record<string, PropertySchema>

    The values of a nested object whose keys are not known up front, by key pattern.

    primaryKey?: boolean

    Marks the property as a primary key.

    properties?: Record<string, PropertySchema>

    The fields of a nested object.

    required?: string[]

    The nested fields the database holds a value for in every row.

    type?: string | string[]

    The JSON type of the value, such as string, integer or object.