A data source represents a set of related data collections on a document. Typically one data source
is produced for each data import.
Extends
Constructors
new DataSourceProxy()
new DataSourceProxy(id, client): DataSourceProxy
Parameters
Parameter | Type | Description |
---|---|---|
id | string | ID of the dataSource on the current document |
client | EditorClient |
Returns
Overrides
PropertyStoreProxy
.constructor
Properties
client
protected readonly client: EditorClient;
Inherited from
collections
readonly collections: MapProxy<string, CollectionProxy>;
The set of data collections in this data source, organized by ID on this document. The IDs will
remain stable for as long as the collection exists on this document, but will vary from
the collection ID on other documents if the same data is imported there.
id
readonly id: string;
ID of the dataSource on the current document
Inherited from
properties
readonly properties: WriteableMapProxy<string, JsonSerializable, void, JsonSerializable>;
All properties available on this element, organized by name.
Not all properties are writeable (e.g. "ClassName" on a block).
To move or resize elements, use setLocation() or setBoundingBox() or offset() instead.
Inherited from
Methods
addCollection()
addCollection(name, schema): CollectionProxy
Create a new collection as part of this data source.
Parameters
Parameter | Type | Description |
---|---|---|
name | string | |
schema | SchemaDefinition |
Returns
The newly created collection
getName()
getName(): string
Returns
string
A human-readable name for this data source
getSourceConfig()
getSourceConfig(): object
Returns
object
The source configuration values set when this data source was created