Constructor
new FileSystemStore(path)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
path |
* |
Extends
Classes
Methods
(async) deleteRecord(schema, recordName)
- Source:
- Overrides:
Delete a model instance from the model schema's data directory.
Parameters:
Name | Type | Description |
---|---|---|
schema |
* | |
recordName |
* |
(async) loadRecord(schema, recordName) → {object}
- Source:
- Overrides:
Load a model record's data from the model schema's data directory
Parameters:
Name | Type | Description |
---|---|---|
schema |
* | |
recordName |
* |
Returns:
A plain JS data object
- Type
- object
(async) loadSchema(schema) → {schema}
- Source:
- Overrides:
Load a schema by name, automatically making sure to load the latest
version if there are multiple versions in the schema's `.schema` dir.
Parameters:
Name | Type | Description |
---|---|---|
schema |
* |
Returns:
The latest version of this schema as found in the file system.
- Type
- schema
ready() → {boolean}
- Source:
- Overrides:
Returns:
True if the file system store is ready to read/write files.
- Type
- boolean
(async) saveMigration(schema1, schema2, migration)
- Source:
- Overrides:
...
Parameters:
Name | Type | Description |
---|---|---|
schema1 |
* | |
schema2 |
* | |
migration |
* |
(async) saveRecord(schema, instance, recordName)
- Source:
- Overrides:
Save a model instance to the model schema's data directory.
Parameters:
Name | Type | Description |
---|---|---|
schema |
* | |
instance |
* | |
recordName |
* |
(async) saveSchema(Model)
- Source:
- Overrides:
Save a model's schema to disk
Parameters:
Name | Type | Description |
---|---|---|
Model |
* |