(out *strings.Builder, schemaName, tableName string, check *storepb.CheckConstraintMetadata)
| 1359 | } |
| 1360 | |
| 1361 | func writeAddCheckConstraint(out *strings.Builder, schemaName, tableName string, check *storepb.CheckConstraintMetadata) error { |
| 1362 | if check == nil { |
| 1363 | return nil |
| 1364 | } |
| 1365 | if _, err := fmt.Fprintf(out, "ALTER TABLE \"%s\".\"%s\" ADD CONSTRAINT \"%s\" CHECK %s;\n\n", schemaName, tableName, check.GetName(), check.GetExpression()); err != nil { |
| 1366 | return err |
| 1367 | } |
| 1368 | return nil |
| 1369 | } |
| 1370 | |
| 1371 | func writeAddExcludeConstraint(out *strings.Builder, schemaName, tableName string, exclude *storepb.ExcludeConstraintMetadata) error { |
| 1372 | if exclude == nil { |
no test coverage detected