Skip to main content
Version: 2.13

DataResult

A class representing the necessary operations to create the result of a query in the client database that emitted the query.

Constructors​

Constructor​

new DataResult(): DataResult;

Returns​

DataResult

Methods​

fromQuery()​

static fromQuery(query): DataResult;

Create a new DataResult instance from the specified Query.

Parameters​

ParameterTypeDescription
queryQuery<CloudObject, any>The Query to create a DataResult from.

Returns​

DataResult

A new DataResult instance.


create()​

create(
tag,
model,
properties?): this;

Create a new Data Type instance with the specified InstanceOrTag, Data Type and properties.

Parameters​

ParameterTypeDescription
tagInstanceOrTagThe unique identifier of the object instance to create.
modelInstanceOrTagThe Data Type of the instance to create.
properties?Map<InstanceOrTag, any>The properties to set on the instance.

Returns​

this

This DataResult instance.


createRelation()​

createRelation(
relation,
from,
to): this;

Create a relation between two instances with the specified Relation, from, and to instance tags.

Parameters​

ParameterTypeDescription
relationInstanceOrTagThe type of relation to create.
fromInstanceOrTagThe unique identifier of the source instance.
toInstanceOrTagThe unique identifier of the destination instance.

Returns​

this

This DataResult instance.