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

Function isIdentityColumn

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

isIdentityColumn checks if a column is an identity column.

(column *storepb.ColumnMetadata)

Source from the content-addressed store, hash-verified

1518
1519// isIdentityColumn checks if a column is an identity column.
1520func isIdentityColumn(column *storepb.ColumnMetadata) bool {
1521 return column.IdentityGeneration == storepb.ColumnMetadata_ALWAYS ||
1522 column.IdentityGeneration == storepb.ColumnMetadata_BY_DEFAULT
1523}
1524
1525// buildIdentityColumnMap builds a map of identity columns for the entire database.
1526// Key format: "schemaName.tableName.columnName" -> true

Callers 6

buildIdentityColumnMapFunction · 0.85
getSDLFormatFunction · 0.85
writeColumnSDLFunction · 0.85
buildSkipSequencesMapFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected