Collections
A collection is a table. It is a folder in a domain's datahoster-collections folder, named for the collection. Inside it are a datahoster-collection.json of settings, a folder of typed columns, and, optionally, a folder of records to import from local files.
<datahoster-config-contentRoot>/
api.example.com/
datahoster-collections/
messages/ the "messages" collection
datahoster-collection.json
datahoster-collection-columns/ its columns
datahoster-collection-import/ records to load into it
signups/ the "signups" collection
Contents
Each domain has a datahoster-collections folder; inside it every collection is a folder, named for the collection. Each collection folder holds its settings file, a columns folder, and an optional import folder.
| Name | Type | Description |
|---|---|---|
datahoster-collection.json | file | The collection's settings: its name and its storage chunk sizes. |
datahoster-collection-columns/ | directory | The collection's columns, one JSON file per column. |
datahoster-collection-import/ | directory | Optional. Records to load into the collection on sync, one or more JSON files. |
datahoster-collection.json
One JSON object holding the collection's settings. Its keys are fixed names starting with datahoster-collection-, so none of your own names appear in a key.
{
"datahoster-collection-name": "messages",
"datahoster-collection-recordsPerChunkFile": 1000000,
"datahoster-collection-recordsPerTailChunk": 65536,
"datahoster-collection-maxTextFileSize": 64000000
}
messages collection's settings.| Name | Type | Description |
|---|---|---|
datahoster-collection-name | text | The collection's name. Must match the folder name. Required. |
datahoster-collection-recordsPerChunkFile | integer | How many records the server keeps in one on-disk column-chunk file. Defaults to 1000000. |
datahoster-collection-recordsPerTailChunk | integer | The size, in records, of the in-memory tail buffer the store grows by before it fills a chunk. Defaults to 65536. |
datahoster-collection-maxTextFileSize | integer | The size limit, in bytes, of a text column's strings file before the next one starts. Defaults to 64000000. |