Skip to content

@sqlrooms/ai / formatOtherTableScopesForAi

Function: formatOtherTableScopesForAi()

formatOtherTableScopesForAi(tables, currentDatabase?): string

Formats a compact notice about tables outside the current database's main schema.

Parameters

ParameterTypeDescription
tablesDataTable[]Flat DuckDB table catalog.
currentDatabase?stringName of the active database, when known.

Returns

string

Prompt text describing additional visible table locations, or an empty string when there are no additional scoped tables.