Action
vds_options_get(resource_id, version=None)
¶
Retrieves the options in use by Splitgill for the given resource at the given optional version.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resource_id
|
str
|
the resource ID |
required |
version
|
Optional[int]
|
the version (default is None which means get the latest options) |
None
|
Returns:
| Type | Description |
|---|---|
Optional[dict]
|
the options as a dict, or None if there are no options available |
Source code in ckanext/versioned_datastore/logic/options/action.py
16 17 18 19 20 21 22 23 24 25 26 27 | |
vds_options_update(resource_id, overrides)
¶
Updates the options for the given resource with the new values in the overrides parameter. The existing options are retrieved and then the new options in the overrides dict are written over the top. This allows incremental updates to the existing options. If no options exist, the default options are used as a base.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resource_id
|
str
|
the resource ID |
required |
overrides
|
dict
|
a dict of override options to apply |
required |
Returns:
| Type | Description |
|---|---|
Optional[int]
|
the new options version, or None if nothing was changed |
Source code in ckanext/versioned_datastore/logic/options/action.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | |