(Domain<?> domain)
| 311 | } |
| 312 | |
| 313 | @SuppressWarnings({ "rawtypes", "unchecked" }) |
| 314 | final Query createDomain(Domain<?> domain) { |
| 315 | CreateDomainAsStep s1 = configuration.createDomainIfNotExists() |
| 316 | ? ctx.createDomainIfNotExists(domain) |
| 317 | : ctx.createDomain(domain); |
| 318 | |
| 319 | CreateDomainDefaultStep s2 = s1.as(domain.getDataType()); |
| 320 | CreateDomainConstraintStep s3 = domain.getDataType().defaulted() |
| 321 | ? s2.default_(domain.getDataType().default_()) |
| 322 | : s2; |
| 323 | |
| 324 | if (domain.getChecks().isEmpty()) |
| 325 | return s3; |
| 326 | |
| 327 | return s3.constraints(map(domain.getChecks(), c -> c.constraint())); |
| 328 | } |
| 329 | |
| 330 | final List<Query> createTableOrView(Table<?> table) { |
| 331 | return createTableOrView(table, new HashSet<Table<?>>()); |
no test coverage detected