@squidcloud/client
    Preparing search index...

    Interface CollectionSchema

    Schema for a full collection, allowing partial property definitions with extended metadata.

    interface CollectionSchema {
        applyDefaultValueOn?: "always" | "empty" | "updateOrEmpty";
        checks?: string[];
        default?: "__SQUID_SERVER_TIMESTAMP__";
        description?: string;
        isDate?: boolean;
        isJSON?: boolean;
        items?: PropertySchema;
        milestoning?: MilestoningKind;
        patternProperties?: Record<string, PropertySchema>;
        properties?: Record<string, TopLevelPropertySchema>;
        required?: string[];
        type?: string | string[];
        uniqueKeys?: string[][];
    }

    Hierarchy

    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.

    checks?: string[]

    The rules the database holds every row to, in its own syntax.

    default?: "__SQUID_SERVER_TIMESTAMP__"

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

    description?: string

    What the field holds, in words.

    isDate?: boolean

    Whether the value is a date.

    isJSON?: boolean

    Whether the value is JSON.

    The element of an array.

    milestoning?: MilestoningKind

    Legend/PURE only: milestoning stereotype on the class, if any.

    patternProperties?: Record<string, PropertySchema>

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

    properties?: Record<string, TopLevelPropertySchema>

    The fields of the collection.

    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.

    uniqueKeys?: string[][]

    The sets of fields, other than the primary key, the database keeps unique across rows.