MCPcopy Create free account
hub / github.com/dolthub/doltgresql / schToColMap

Function schToColMap

server/analyzer/validate_create_table.go:108–114  ·  view source on GitHub ↗

schToColMap returns a map of columns, keyed by their name, for the specified schema |sch|.

(sch sql.Schema)

Source from the content-addressed store, hash-verified

106// schToColMap returns a map of columns, keyed by their name, for the specified
107// schema |sch|.
108func schToColMap(sch sql.Schema) map[string]*sql.Column {
109 colMap := make(map[string]*sql.Column, len(sch))
110 for _, col := range sch {
111 colMap[strings.ToLower(col.Name)] = col
112 }
113 return colMap
114}
115
116// validateIndex ensures that the Index Definition is valid for the table schema.
117// This function will throw errors and warnings as needed.

Callers 3

validateIndexesFunction · 0.85
validatePrimaryKeyFunction · 0.85
validateAlterIndexFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected