MCPcopy
hub / github.com/sqlc-dev/sqlc / convertAlterTableCmd

Function convertAlterTableCmd

internal/engine/postgresql/convert.go:509–523  ·  view source on GitHub ↗
(n *pg.AlterTableCmd)

Source from the content-addressed store, hash-verified

507}
508
509func convertAlterTableCmd(n *pg.AlterTableCmd) *ast.AlterTableCmd {
510 if n == nil {
511 return nil
512 }
513 def := convertNode(n.Def)
514 columnDef := def.(*ast.ColumnDef)
515 return &ast.AlterTableCmd{
516 Subtype: ast.AlterTableType(n.Subtype),
517 Name: makeString(n.Name),
518 Newowner: convertRoleSpec(n.Newowner),
519 Def: columnDef,
520 Behavior: ast.DropBehavior(n.Behavior),
521 MissingOk: n.MissingOk,
522 }
523}
524
525func convertAlterTableMoveAllStmt(n *pg.AlterTableMoveAllStmt) *ast.AlterTableMoveAllStmt {
526 if n == nil {

Callers 1

convertNodeFunction · 0.85

Calls 5

AlterTableTypeTypeAlias · 0.92
DropBehaviorTypeAlias · 0.92
convertNodeFunction · 0.85
makeStringFunction · 0.85
convertRoleSpecFunction · 0.85

Tested by

no test coverage detected