MCPcopy Create free account
hub / github.com/bytebase/dbhub / getTableComment

Function getTableComment

src/tools/search-objects.ts:123–136  ·  view source on GitHub ↗

* Get table comment from the connector if supported.

(
  connector: Connector,
  tableName: string,
  schemaName?: string
)

Source from the content-addressed store, hash-verified

121 * Get table comment from the connector if supported.
122 */
123async function getTableComment(
124 connector: Connector,
125 tableName: string,
126 schemaName?: string
127): Promise<string | null> {
128 try {
129 if (connector.getTableComment) {
130 return await connector.getTableComment(tableName, schemaName);
131 }
132 return null;
133 } catch (error) {
134 return null;
135 }
136}
137
138/**
139 * Search for schemas

Callers 2

searchTablesFunction · 0.85
searchViewsFunction · 0.85

Calls 1

getTableCommentMethod · 0.65

Tested by

no test coverage detected