MCPcopy Create free account
hub / github.com/auxten/postgresql-parser / columnTypeString

Method columnTypeString

pkg/sql/sem/tree/create.go:483–495  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

481}
482
483func (node *ColumnTableDef) columnTypeString() string {
484 if node.IsSerial {
485 // Map INT types to SERIAL keyword.
486 switch node.Type.Width() {
487 case 16:
488 return "SERIAL2"
489 case 32:
490 return "SERIAL4"
491 }
492 return "SERIAL8"
493 }
494 return node.Type.SQLString()
495}
496
497// String implements the fmt.Stringer interface.
498func (node *ColumnTableDef) String() string { return AsString(node) }

Callers 2

docRowMethod · 0.95
FormatMethod · 0.95

Calls 2

WidthMethod · 0.80
SQLStringMethod · 0.80

Tested by

no test coverage detected