Class: EntityCollection

.Service. EntityCollection


new EntityCollection()

Collection class to handle ORM to a datasource

Note: Datasource property is required

Source:

Members


<static> datasource

Properties:
Name Type Description
datasource Augmented.Service.DataSource

Datasource instance

Source:

<static> name

Collection name for us in a datasource or an identifier

Properties:
Name Type Description
name string

The name of the collection

Source:

<static> url

Properties:
Name Type Description
url string

The url for the datasource (if applicable)

Source:

Methods


<static> destroy Destroy the entity(options)

Parameters:
Name Type Description
options object

Any options to pass

Source:

<static> fetch Fetch the entity(options)

Parameters:
Name Type Description
options object

Any options to pass

Source:

<static> init Custom init method for the model (options)

Parameters:
Name Type Description
options object

Any options to pass

Source:

<static> initialize Initialize the model with needed wireing(options)

Parameters:
Name Type Description
options object

Any options to pass

Source:

<static> save Save the entity(options)

Parameters:
Name Type Description
options object

Any options to pass

Source:

<static> setDatasource Set the datasource for the Collection(datasource)

Parameters:
Name Type Description
datasource object

The datasource object

Source:

<static> sync Sync method to handle datasource functions for the Collection(method, options)

Parameters:
Name Type Description
method string

the operation to perform

options object

Any options to pass

Source:

<static> update Update the entity(options)

Parameters:
Name Type Description
options object

Any options to pass

Source:

<static> {any} query The query string to use for selection()

The query to use for the query - defaults to "id" selection

Source: