Action
vds_version_record(resource_id, record_id)
¶
Retrieves all the versions available for a record in a resource. These will be returned as a list of ints in ascending order.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resource_id
|
str
|
the resource ID |
required |
record_id
|
str
|
the record ID |
required |
Returns:
| Type | Description |
|---|---|
List[int]
|
a list of versions, or an empty list if the record doesn't exist |
Source code in ckanext/versioned_datastore/logic/version/action.py
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | |
vds_version_resource(resource_id)
¶
Returns a list of the available versions for a datastore resource. These will be in ascending order.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resource_id
|
str
|
the resource ID |
required |
Returns:
| Type | Description |
|---|---|
List[int]
|
the versions in ascending order |
Source code in ckanext/versioned_datastore/logic/version/action.py
45 46 47 48 49 50 51 52 53 54 55 | |
vds_version_round(resource_id, version=None)
¶
Given a resource ID and a version, rounds the version to the lowest, nearest version of the resource (i.e. rounds it down). If no version parameter is provided, or the provided version parameter higher than the current version of the resource, then the latest version of the resource is returned.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resource_id
|
str
|
the resource ID |
required |
version
|
Optional[int]
|
the version to round (default is None) |
None
|
Returns:
| Type | Description |
|---|---|
|
the rounded version |
Source code in ckanext/versioned_datastore/logic/version/action.py
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | |
vds_version_schema()
¶
Retrieves all the query schema versions that are available.
Returns:
| Type | Description |
|---|---|
|
a list of query schema versions. |
Source code in ckanext/versioned_datastore/logic/version/action.py
15 16 17 18 19 20 21 22 | |