MCPcopy Create free account
hub / github.com/bytebase/bytebase / tableHasNoColumns

Function tableHasNoColumns

backend/plugin/schema/pg/get_database_definition.go:1602–1604  ·  view source on GitHub ↗

tableHasNoColumns reports an empty synced column list, whether genuinely zero-column or privilege-filtered. A sequence cannot be owned by a column of such a table, so ALTER SEQUENCE ... OWNED BY is skipped either way.

(table *storepb.TableMetadata)

Source from the content-addressed store, hash-verified

1600// zero-column or privilege-filtered. A sequence cannot be owned by a column
1601// of such a table, so ALTER SEQUENCE ... OWNED BY is skipped either way.
1602func tableHasNoColumns(table *storepb.TableMetadata) bool {
1603 return len(table.Columns) == 0
1604}
1605
1606// collectTables returns the tables matching include, keyed by
1607// getObjectID(schema, table).

Callers 2

writeTableFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected