MCPcopy
hub / github.com/jOOQ/jOOQ / createDomain

Method createDomain

jOOQ/src/main/java/org/jooq/impl/DDL.java:313–328  ·  view source on GitHub ↗
(Domain<?> domain)

Source from the content-addressed store, hash-verified

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<?>>());

Callers 1

queriesMethod · 0.95

Calls 12

asMethod · 0.95
default_Method · 0.95
constraintsMethod · 0.95
createDomainMethod · 0.65
getDataTypeMethod · 0.65
defaultedMethod · 0.65
default_Method · 0.65
isEmptyMethod · 0.65
getChecksMethod · 0.65
mapMethod · 0.65
constraintMethod · 0.65

Tested by

no test coverage detected