(constraint *pgquery.Constraint)
| 1511 | } |
| 1512 | |
| 1513 | func (p PostgresParser) parseCheckConstraint(constraint *pgquery.Constraint) (*parser.CheckDefinition, error) { |
| 1514 | expr, err := p.parseExpr(constraint.RawExpr) |
| 1515 | |
| 1516 | if err != nil { |
| 1517 | return nil, err |
| 1518 | } |
| 1519 | |
| 1520 | return &parser.CheckDefinition{ |
| 1521 | Where: *parser.NewWhere(parser.WhereStr, expr), |
| 1522 | ConstraintName: parser.NewIdent(constraint.Conname, false), |
| 1523 | NoInherit: parser.BoolVal(constraint.IsNoInherit), |
| 1524 | }, nil |
| 1525 | } |
| 1526 | |
| 1527 | func (p PostgresParser) parseCreateSchemaStmt(stmt *pgquery.CreateSchemaStmt) (parser.Statement, error) { |
| 1528 | return &parser.DDL{ |
no test coverage detected