MCPcopy Create free account
hub / github.com/ajitpratap0/GoSQLX / columnDefSQL

Function columnDefSQL

pkg/sql/ast/sql.go:1459–1471  ·  view source on GitHub ↗
(c *ColumnDef)

Source from the content-addressed store, hash-verified

1457}
1458
1459func columnDefSQL(c *ColumnDef) string {
1460 sb := getBuilder()
1461 defer putBuilder(sb)
1462 sb.WriteString(c.Name)
1463 sb.WriteString(" ")
1464 sb.WriteString(c.Type)
1465 for _, con := range c.Constraints {
1466 con := con // G601: Create local copy to avoid memory aliasing
1467 sb.WriteString(" ")
1468 sb.WriteString(columnConstraintSQL(&con))
1469 }
1470 return sb.String()
1471}
1472
1473func columnConstraintSQL(c *ColumnConstraint) string {
1474 switch c.Type {

Callers 2

SQLMethod · 0.70
alterActionSQLFunction · 0.70

Calls 4

getBuilderFunction · 0.85
putBuilderFunction · 0.85
columnConstraintSQLFunction · 0.70
StringMethod · 0.45

Tested by

no test coverage detected