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

Function convertCaseExpr

internal/engine/postgresql/convert.go:681–694  ·  view source on GitHub ↗
(n *pg.CaseExpr)

Source from the content-addressed store, hash-verified

679}
680
681func convertCaseExpr(n *pg.CaseExpr) *ast.CaseExpr {
682 if n == nil {
683 return nil
684 }
685 return &ast.CaseExpr{
686 Xpr: convertNode(n.Xpr),
687 Casetype: ast.Oid(n.Casetype),
688 Casecollid: ast.Oid(n.Casecollid),
689 Arg: convertNode(n.Arg),
690 Args: convertSlice(n.Args),
691 Defresult: convertNode(n.Defresult),
692 Location: int(n.Location),
693 }
694}
695
696func convertCaseTestExpr(n *pg.CaseTestExpr) *ast.CaseTestExpr {
697 if n == nil {

Callers 1

convertNodeFunction · 0.85

Calls 3

OidTypeAlias · 0.92
convertNodeFunction · 0.85
convertSliceFunction · 0.85

Tested by

no test coverage detected