MD_LIST_GUIDE_VERSIONS
Preview
This feature is in preview and is subject to change.
List a Guide's version history without content. Read a specific version's content with MD_GET_GUIDE and its version parameter.
Syntax
SELECT * FROM MD_LIST_GUIDE_VERSIONS(id = '<guide_uuid>');
-- With pagination
SELECT * FROM MD_LIST_GUIDE_VERSIONS(
id = '<guide_uuid>',
"limit" = 10,
"offset" = 0
);
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | UUID | Yes | The Guide's UUID. |
"limit" | UINTEGER | No | Maximum number of versions to return. |
"offset" | UINTEGER | No | Number of versions to skip (for pagination). |
Return columns
| Column | Type | Description |
|---|---|---|
version | UINTEGER | Version number |
change_comment | VARCHAR | Note describing this version's change |
external_id | VARCHAR | Caller-provided version ID (for example a git SHA) |
created_at | TIMESTAMP WITH TIME ZONE | When this version was created |
Examples
Browse a Guide's history:
SELECT version, change_comment, created_at
FROM MD_LIST_GUIDE_VERSIONS(id = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890')
ORDER BY version DESC;
Read the content of an older version found in the history:
SELECT content
FROM MD_GET_GUIDE(
id = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
version = 2
);
Related
MD_GET_GUIDE— Read a specific version's content.MD_UPDATE_GUIDE— Append a version.