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

Function convertCreateEnumStmt

internal/engine/postgresql/convert.go:1017–1029  ·  view source on GitHub ↗
(n *pg.CreateEnumStmt)

Source from the content-addressed store, hash-verified

1015}
1016
1017func convertCreateEnumStmt(n *pg.CreateEnumStmt) *ast.CreateEnumStmt {
1018 if n == nil {
1019 return nil
1020 }
1021 rel, err := parseRelationFromNodes(n.TypeName)
1022 if err != nil {
1023 panic(err)
1024 }
1025 return &ast.CreateEnumStmt{
1026 TypeName: rel.TypeName(),
1027 Vals: convertSlice(n.Vals),
1028 }
1029}
1030
1031func convertCreateEventTrigStmt(n *pg.CreateEventTrigStmt) *ast.CreateEventTrigStmt {
1032 if n == nil {

Callers 1

convertNodeFunction · 0.85

Calls 3

parseRelationFromNodesFunction · 0.85
convertSliceFunction · 0.85
TypeNameMethod · 0.65

Tested by

no test coverage detected