MCPcopy
hub / github.com/pingcap/tidb / RetrieveColumn

Method RetrieveColumn

pkg/expression/schema.go:123–129  ·  view source on GitHub ↗

RetrieveColumn retrieves column in expression from the columns in schema.

(col *Column)

Source from the content-addressed store, hash-verified

121
122// RetrieveColumn retrieves column in expression from the columns in schema.
123func (s *Schema) RetrieveColumn(col *Column) *Column {
124 index := s.ColumnIndex(col)
125 if index != -1 {
126 return s.Columns[index]
127 }
128 return nil
129}
130
131// IsUnique checks if the column is unique key.
132// Pass strong=true to check strong contraint: unique && notnull.

Callers 5

ExtractOnConditionMethod · 0.80
deriveNotNullExprFunction · 0.80
isNullWithNotNullColumnFunction · 0.80
TestSchemaRetrieveColumnFunction · 0.80
propagateColumnEQMethod · 0.80

Calls 1

ColumnIndexMethod · 0.95

Tested by 1

TestSchemaRetrieveColumnFunction · 0.64