.createCollection()
Creates a new collection where data will be stored in a separate file.
Last updated
Creates a new collection where data will be stored in a separate file.
Last updated
With default values:
With incrementable properties:
Incrementable properties were added in the version 2.6.0.
They are used to assign an automatic value to an entry from the collection, incrementing its value when a new entry is inserted into the collection.
To represent an incrementable property, you must put a dollar sign ($
) before the property name and provide its initial value. The dollar sign will not appear in the entry's properties (ex.: $id
will set a property named id
).
Incrementable properties only work with values of type Number.
Parameter
Default
Description
name
The name for the collection
defaultValues
{}
Data (optional)
Default values for omitted keys
Returns
Description
The new collection