LLMs to turn Ad Hoc Questions into Real-Time AnswersRegister

Skip to main content

MD_GET_DIVE

Public Preview

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

Retrieves a single Dive by ID, including the full React component source code for the current version.

Syntax

SELECT * FROM MD_GET_DIVE(id ='your-dive-uuid'::UUID);

Parameters

ParameterTypeRequiredDescription
idUUIDYesThe unique identifier of the Dive

Return Columns

ColumnTypeDescription
idUUIDUnique identifier of the Dive
titleVARCHARDive title
descriptionVARCHARDive description
owner_idUUIDUUID of the Dive owner
current_versionINTEGERLatest version number (1-based)
created_atTIMESTAMP WITH TIME ZONEWhen the Dive was created
updated_atTIMESTAMP WITH TIME ZONEWhen the Dive was last updated
owner_nameVARCHARName of the Dive owner
version_idUUIDUUID of the current version
version_storage_urlVARCHARStorage URL of the current version content
version_descriptionVARCHARDescription/commit message for the current version
version_created_atTIMESTAMP WITH TIME ZONEWhen the current version was created
version_api_versionUINTEGERAPI version used to create this version
contentVARCHARFull JSX/React component source code

Examples

Read a Dive by ID:

SELECT title, description, content
FROM MD_GET_DIVE(id ='a1b2c3d4-e5f6-7890-abcd-ef1234567890'::UUID);

Get the metadata without the content:

SELECT id, title, owner_name, current_version, updated_at
FROM MD_GET_DIVE(id ='a1b2c3d4-e5f6-7890-abcd-ef1234567890'::UUID);

Errors

Returns an error if the Dive does not exist.