Type alias CollectionImportOptions

CollectionImportOptions: {
    complete?: boolean;
    details?: boolean;
    fromPrefix?: string;
    onDuplicate?: "error" | "update" | "replace" | "ignore";
    overwrite?: boolean;
    toPrefix?: string;
    waitForSync?: boolean;
}

Options for bulk importing documents into a collection.

Type declaration

  • Optional complete?: boolean

    If set to true, the import will abort if any error occurs.

  • Optional details?: boolean

    Whether the response should contain additional details about documents that could not be imported.

  • Optional fromPrefix?: string

    (Edge collections only.) Prefix to prepend to _from attribute values.

  • Optional onDuplicate?: "error" | "update" | "replace" | "ignore"

    Controls behavior when a unique constraint is violated on the document key.

    • "error": the document will not be imported.
    • "update: the document will be merged into the existing document.
    • "replace": the document will replace the existing document.
    • "ignore": the document will not be imported and the unique constraint error will be ignored.

    Default: "error"

  • Optional overwrite?: boolean

    If set to true, the collection is truncated before the data is imported.

    Default: false

  • Optional toPrefix?: string

    (Edge collections only.) Prefix to prepend to _to attribute values.

  • Optional waitForSync?: boolean

    Whether to wait for the documents to have been synced to disk.

Generated using TypeDoc