LLMs to turn Ad Hoc Questions into Real-Time AnswersRegister

Skip to main content

MD_GET_DIVE_VERSION

Public Preview

Dives are currently in public preview and functionality is subject to change.

Retrieves a specific version of a Dive, including the full React component source code. Version numbers are 0-based—the first version of a Dive is version 0.

Syntax

SELECT * FROM MD_GET_DIVE_VERSION(
id = 'your-dive-uuid'::UUID,
version = 0
);

Parameters

ParameterTypeRequiredDescription
idUUIDYesThe unique identifier of the Dive
versionUINTEGERYesThe version number to retrieve (0-based)

Return Columns

ColumnTypeDescription
idUUIDUUID of this version
versionUINTEGERVersion number
storage_urlVARCHARStorage URL of the version content
descriptionVARCHARVersion description or commit message
created_atTIMESTAMP WITH TIME ZONEWhen this version was created
api_versionUINTEGERAPI version used to create this version
contentVARCHARFull JSX/React component source code

Examples

Read the original version of a Dive:

SELECT content
FROM MD_GET_DIVE_VERSION(
id = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890'::UUID,
version = 0
);

Compare version metadata:

SELECT version, description, created_at
FROM MD_GET_DIVE_VERSION(
id = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890'::UUID,
version = 2
);

Errors

Returns an error if the Dive or the specified version does not exist.