blob: a74295baa0ea98934b92e3ed91b91973eda2cc31 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
/*
* SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
*
* SPDX-License-Identifier: EPL-2.0
*/
package tools.refinery.logic.dnf;
import tools.refinery.logic.term.DataVariable;
public final class QueryBuilder extends AbstractQueryBuilder<QueryBuilder> {
QueryBuilder(String name) {
super(Dnf.builder(name));
}
@Override
protected QueryBuilder self() {
return this;
}
public <T> FunctionalQueryBuilder<T> output(DataVariable<T> outputVariable) {
return new FunctionalQueryBuilder<>(outputVariable, dnfBuilder, outputVariable.getType());
}
public RelationalQuery build() {
return dnfBuilder.build().asRelation();
}
}
|