CollectionPatch

A patch to a collection or the definition of a new collection to be added. If adding a new collection, a schema must
be provided. If modifying an existing collection, a schema may be omitted.


Properties

hideFromDataPanel?

optional hideFromDataPanel: boolean;

Whether the collection is hidden from the data panel


name?

optional name: string;

The collection's display name


patch

patch: ItemsPatch;

The patch to apply to the collection


queryError?

optional queryError: null | string;

Last query-execution error message for a query collection. Pass null to clear an
existing error after a successful execution; pass an error string to record the
failure reason. Leave undefined to leave the existing value unchanged.


queryLastExecutionTimestamp?

optional queryLastExecutionTimestamp: number;

Wall-clock timestamp (epoch milliseconds) of the most recent successful query execution
for a query collection. Leave undefined to leave the existing value unchanged.


represents?

optional represents: SemanticCollection[];

What the collection implicitly represents *


schema?

optional schema: SchemaDefinition;

If changing an existing schema only the following changes are allowed:

  1. Adding a nullable field
  2. Promoting a type of a field to a union of types (string -> string | number)
  3. Adding a new variant to a union type (string | number -> string | number | boolean)
  • Removing a field is not allowed (just add | null and don't provide the field in patches anymore).
  • Changing a type in a way that any existing legal value is no longer valid for that field is not allowed.