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

Function convertCreateStmt

internal/engine/postgresql/convert.go:1244–1261  ·  view source on GitHub ↗
(n *pg.CreateStmt)

Source from the content-addressed store, hash-verified

1242}
1243
1244func convertCreateStmt(n *pg.CreateStmt) *ast.CreateStmt {
1245 if n == nil {
1246 return nil
1247 }
1248 return &ast.CreateStmt{
1249 Relation: convertRangeVar(n.Relation),
1250 TableElts: convertSlice(n.TableElts),
1251 InhRelations: convertSlice(n.InhRelations),
1252 Partbound: convertPartitionBoundSpec(n.Partbound),
1253 Partspec: convertPartitionSpec(n.Partspec),
1254 OfTypename: convertTypeName(n.OfTypename),
1255 Constraints: convertSlice(n.Constraints),
1256 Options: convertSlice(n.Options),
1257 Oncommit: ast.OnCommitAction(n.Oncommit),
1258 Tablespacename: makeString(n.Tablespacename),
1259 IfNotExists: n.IfNotExists,
1260 }
1261}
1262
1263func convertCreateSubscriptionStmt(n *pg.CreateSubscriptionStmt) *ast.CreateSubscriptionStmt {
1264 if n == nil {

Callers 1

convertNodeFunction · 0.85

Calls 7

OnCommitActionTypeAlias · 0.92
convertRangeVarFunction · 0.85
convertSliceFunction · 0.85
convertPartitionSpecFunction · 0.85
makeStringFunction · 0.85
convertTypeNameFunction · 0.70

Tested by

no test coverage detected