[jOOQ/jOOQ#13640] Added QOM.JoinTable etc
This commit is contained in:
parent
4cf7d3844c
commit
8d110ef117
78
jOOQ/src/main/java/org/jooq/impl/CrossApply.java
Normal file
78
jOOQ/src/main/java/org/jooq/impl/CrossApply.java
Normal file
@ -0,0 +1,78 @@
|
||||
/*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* Other licenses:
|
||||
* -----------------------------------------------------------------------------
|
||||
* Commercial licenses for this work are available. These replace the above
|
||||
* ASL 2.0 and offer limited warranties, support, maintenance, and commercial
|
||||
* database integrations.
|
||||
*
|
||||
* For more information, please visit: https://www.jooq.org/legal/licensing
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.jooq.impl;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import org.jooq.Condition;
|
||||
import org.jooq.Field;
|
||||
import org.jooq.JoinType;
|
||||
import org.jooq.Record;
|
||||
import org.jooq.Table;
|
||||
import org.jooq.TableLike;
|
||||
|
||||
/**
|
||||
* @author Lukas Eder
|
||||
*/
|
||||
final class CrossApply
|
||||
extends
|
||||
JoinTable<CrossApply>
|
||||
implements
|
||||
QOM.CrossApply<Record>
|
||||
{
|
||||
|
||||
CrossApply(TableLike<?> lhs, TableLike<?> rhs) {
|
||||
super(lhs, rhs, JoinType.CROSS_APPLY);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// XXX: Query Object Model
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
CrossApply construct(
|
||||
Table<?> table1,
|
||||
Collection<? extends Field<?>> partitionBy1,
|
||||
Collection<? extends Field<?>> partitionBy2,
|
||||
Table<?> table2,
|
||||
Condition o,
|
||||
Collection<? extends Field<?>> u
|
||||
) {
|
||||
return new CrossApply(table1, table2);
|
||||
}
|
||||
}
|
||||
78
jOOQ/src/main/java/org/jooq/impl/CrossJoin.java
Normal file
78
jOOQ/src/main/java/org/jooq/impl/CrossJoin.java
Normal file
@ -0,0 +1,78 @@
|
||||
/*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* Other licenses:
|
||||
* -----------------------------------------------------------------------------
|
||||
* Commercial licenses for this work are available. These replace the above
|
||||
* ASL 2.0 and offer limited warranties, support, maintenance, and commercial
|
||||
* database integrations.
|
||||
*
|
||||
* For more information, please visit: https://www.jooq.org/legal/licensing
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.jooq.impl;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import org.jooq.Condition;
|
||||
import org.jooq.Field;
|
||||
import org.jooq.JoinType;
|
||||
import org.jooq.Record;
|
||||
import org.jooq.Table;
|
||||
import org.jooq.TableLike;
|
||||
|
||||
/**
|
||||
* @author Lukas Eder
|
||||
*/
|
||||
final class CrossJoin
|
||||
extends
|
||||
JoinTable<CrossJoin>
|
||||
implements
|
||||
QOM.CrossJoin<Record>
|
||||
{
|
||||
|
||||
CrossJoin(TableLike<?> lhs, TableLike<?> rhs) {
|
||||
super(lhs, rhs, JoinType.CROSS_JOIN);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// XXX: Query Object Model
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
CrossJoin construct(
|
||||
Table<?> table1,
|
||||
Collection<? extends Field<?>> partitionBy1,
|
||||
Collection<? extends Field<?>> partitionBy2,
|
||||
Table<?> table2,
|
||||
Condition o,
|
||||
Collection<? extends Field<?>> u
|
||||
) {
|
||||
return new CrossJoin(table1, table2);
|
||||
}
|
||||
}
|
||||
79
jOOQ/src/main/java/org/jooq/impl/FullJoin.java
Normal file
79
jOOQ/src/main/java/org/jooq/impl/FullJoin.java
Normal file
@ -0,0 +1,79 @@
|
||||
/*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* Other licenses:
|
||||
* -----------------------------------------------------------------------------
|
||||
* Commercial licenses for this work are available. These replace the above
|
||||
* ASL 2.0 and offer limited warranties, support, maintenance, and commercial
|
||||
* database integrations.
|
||||
*
|
||||
* For more information, please visit: https://www.jooq.org/legal/licensing
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.jooq.impl;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import org.jooq.Condition;
|
||||
import org.jooq.Field;
|
||||
import org.jooq.JoinType;
|
||||
import org.jooq.Record;
|
||||
import org.jooq.Table;
|
||||
import org.jooq.TableLike;
|
||||
|
||||
/**
|
||||
* @author Lukas Eder
|
||||
*/
|
||||
final class FullJoin
|
||||
extends
|
||||
JoinTable<FullJoin>
|
||||
implements
|
||||
QOM.FullJoin<Record>
|
||||
{
|
||||
|
||||
FullJoin(TableLike<?> lhs, TableLike<?> rhs) {
|
||||
super(lhs, rhs, JoinType.FULL_OUTER_JOIN);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// XXX: Query Object Model
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
FullJoin construct(
|
||||
Table<?> table1,
|
||||
Collection<? extends Field<?>> partitionBy1,
|
||||
Collection<? extends Field<?>> partitionBy2,
|
||||
Table<?> table2,
|
||||
Condition o,
|
||||
Collection<? extends Field<?>> u
|
||||
) {
|
||||
// [#6116] [#11687] TODO: Partition by clauses
|
||||
return o != null ? new FullJoin(table1, table2).on(o) : new FullJoin(table1, table2).using(u);
|
||||
}
|
||||
}
|
||||
78
jOOQ/src/main/java/org/jooq/impl/Join.java
Normal file
78
jOOQ/src/main/java/org/jooq/impl/Join.java
Normal file
@ -0,0 +1,78 @@
|
||||
/*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* Other licenses:
|
||||
* -----------------------------------------------------------------------------
|
||||
* Commercial licenses for this work are available. These replace the above
|
||||
* ASL 2.0 and offer limited warranties, support, maintenance, and commercial
|
||||
* database integrations.
|
||||
*
|
||||
* For more information, please visit: https://www.jooq.org/legal/licensing
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.jooq.impl;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import org.jooq.Condition;
|
||||
import org.jooq.Field;
|
||||
import org.jooq.JoinType;
|
||||
import org.jooq.Record;
|
||||
import org.jooq.Table;
|
||||
import org.jooq.TableLike;
|
||||
|
||||
/**
|
||||
* @author Lukas Eder
|
||||
*/
|
||||
final class Join
|
||||
extends
|
||||
JoinTable<Join>
|
||||
implements
|
||||
QOM.Join<Record>
|
||||
{
|
||||
|
||||
Join(TableLike<?> lhs, TableLike<?> rhs) {
|
||||
super(lhs, rhs, JoinType.JOIN);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// XXX: Query Object Model
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
Join construct(
|
||||
Table<?> table1,
|
||||
Collection<? extends Field<?>> partitionBy1,
|
||||
Collection<? extends Field<?>> partitionBy2,
|
||||
Table<?> table2,
|
||||
Condition o,
|
||||
Collection<? extends Field<?>> u
|
||||
) {
|
||||
return o != null ? new Join(table1, table2).on(o) : new Join(table1, table2).using(u);
|
||||
}
|
||||
}
|
||||
78
jOOQ/src/main/java/org/jooq/impl/LeftAntiJoin.java
Normal file
78
jOOQ/src/main/java/org/jooq/impl/LeftAntiJoin.java
Normal file
@ -0,0 +1,78 @@
|
||||
/*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* Other licenses:
|
||||
* -----------------------------------------------------------------------------
|
||||
* Commercial licenses for this work are available. These replace the above
|
||||
* ASL 2.0 and offer limited warranties, support, maintenance, and commercial
|
||||
* database integrations.
|
||||
*
|
||||
* For more information, please visit: https://www.jooq.org/legal/licensing
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.jooq.impl;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import org.jooq.Condition;
|
||||
import org.jooq.Field;
|
||||
import org.jooq.JoinType;
|
||||
import org.jooq.Record;
|
||||
import org.jooq.Table;
|
||||
import org.jooq.TableLike;
|
||||
|
||||
/**
|
||||
* @author Lukas Eder
|
||||
*/
|
||||
final class LeftAntiJoin
|
||||
extends
|
||||
JoinTable<LeftAntiJoin>
|
||||
implements
|
||||
QOM.LeftAntiJoin<Record>
|
||||
{
|
||||
|
||||
LeftAntiJoin(TableLike<?> lhs, TableLike<?> rhs) {
|
||||
super(lhs, rhs, JoinType.LEFT_ANTI_JOIN);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// XXX: Query Object Model
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
LeftAntiJoin construct(
|
||||
Table<?> table1,
|
||||
Collection<? extends Field<?>> partitionBy1,
|
||||
Collection<? extends Field<?>> partitionBy2,
|
||||
Table<?> table2,
|
||||
Condition o,
|
||||
Collection<? extends Field<?>> u
|
||||
) {
|
||||
return o != null ? new LeftAntiJoin(table1, table2).on(o) : new LeftAntiJoin(table1, table2).using(u);
|
||||
}
|
||||
}
|
||||
79
jOOQ/src/main/java/org/jooq/impl/LeftJoin.java
Normal file
79
jOOQ/src/main/java/org/jooq/impl/LeftJoin.java
Normal file
@ -0,0 +1,79 @@
|
||||
/*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* Other licenses:
|
||||
* -----------------------------------------------------------------------------
|
||||
* Commercial licenses for this work are available. These replace the above
|
||||
* ASL 2.0 and offer limited warranties, support, maintenance, and commercial
|
||||
* database integrations.
|
||||
*
|
||||
* For more information, please visit: https://www.jooq.org/legal/licensing
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.jooq.impl;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import org.jooq.Condition;
|
||||
import org.jooq.Field;
|
||||
import org.jooq.JoinType;
|
||||
import org.jooq.Record;
|
||||
import org.jooq.Table;
|
||||
import org.jooq.TableLike;
|
||||
|
||||
/**
|
||||
* @author Lukas Eder
|
||||
*/
|
||||
final class LeftJoin
|
||||
extends
|
||||
JoinTable<LeftJoin>
|
||||
implements
|
||||
QOM.LeftJoin<Record>
|
||||
{
|
||||
|
||||
LeftJoin(TableLike<?> lhs, TableLike<?> rhs) {
|
||||
super(lhs, rhs, JoinType.LEFT_OUTER_JOIN);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// XXX: Query Object Model
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
LeftJoin construct(
|
||||
Table<?> table1,
|
||||
Collection<? extends Field<?>> partitionBy1,
|
||||
Collection<? extends Field<?>> partitionBy2,
|
||||
Table<?> table2,
|
||||
Condition o,
|
||||
Collection<? extends Field<?>> u
|
||||
) {
|
||||
// [#6116] [#11687] TODO: Partition by clauses
|
||||
return o != null ? new LeftJoin(table1, table2).on(o) : new LeftJoin(table1, table2).using(u);
|
||||
}
|
||||
}
|
||||
78
jOOQ/src/main/java/org/jooq/impl/LeftSemiJoin.java
Normal file
78
jOOQ/src/main/java/org/jooq/impl/LeftSemiJoin.java
Normal file
@ -0,0 +1,78 @@
|
||||
/*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* Other licenses:
|
||||
* -----------------------------------------------------------------------------
|
||||
* Commercial licenses for this work are available. These replace the above
|
||||
* ASL 2.0 and offer limited warranties, support, maintenance, and commercial
|
||||
* database integrations.
|
||||
*
|
||||
* For more information, please visit: https://www.jooq.org/legal/licensing
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.jooq.impl;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import org.jooq.Condition;
|
||||
import org.jooq.Field;
|
||||
import org.jooq.JoinType;
|
||||
import org.jooq.Record;
|
||||
import org.jooq.Table;
|
||||
import org.jooq.TableLike;
|
||||
|
||||
/**
|
||||
* @author Lukas Eder
|
||||
*/
|
||||
final class LeftSemiJoin
|
||||
extends
|
||||
JoinTable<LeftSemiJoin>
|
||||
implements
|
||||
QOM.LeftSemiJoin<Record>
|
||||
{
|
||||
|
||||
LeftSemiJoin(TableLike<?> lhs, TableLike<?> rhs) {
|
||||
super(lhs, rhs, JoinType.LEFT_SEMI_JOIN);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// XXX: Query Object Model
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
LeftSemiJoin construct(
|
||||
Table<?> table1,
|
||||
Collection<? extends Field<?>> partitionBy1,
|
||||
Collection<? extends Field<?>> partitionBy2,
|
||||
Table<?> table2,
|
||||
Condition o,
|
||||
Collection<? extends Field<?>> u
|
||||
) {
|
||||
return o != null ? new LeftSemiJoin(table1, table2).on(o) : new LeftSemiJoin(table1, table2).using(u);
|
||||
}
|
||||
}
|
||||
81
jOOQ/src/main/java/org/jooq/impl/NaturalFullJoin.java
Normal file
81
jOOQ/src/main/java/org/jooq/impl/NaturalFullJoin.java
Normal file
@ -0,0 +1,81 @@
|
||||
/*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* Other licenses:
|
||||
* -----------------------------------------------------------------------------
|
||||
* Commercial licenses for this work are available. These replace the above
|
||||
* ASL 2.0 and offer limited warranties, support, maintenance, and commercial
|
||||
* database integrations.
|
||||
*
|
||||
* For more information, please visit: https://www.jooq.org/legal/licensing
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.jooq.impl;
|
||||
|
||||
import static java.util.Collections.emptyList;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import org.jooq.Condition;
|
||||
import org.jooq.Field;
|
||||
import org.jooq.JoinType;
|
||||
import org.jooq.Record;
|
||||
import org.jooq.Table;
|
||||
import org.jooq.TableLike;
|
||||
|
||||
/**
|
||||
* @author Lukas Eder
|
||||
*/
|
||||
final class NaturalFullJoin
|
||||
extends
|
||||
JoinTable<NaturalFullJoin>
|
||||
implements
|
||||
QOM.NaturalFullJoin<Record>
|
||||
{
|
||||
|
||||
NaturalFullJoin(TableLike<?> lhs, TableLike<?> rhs) {
|
||||
super(lhs, rhs, JoinType.NATURAL_FULL_OUTER_JOIN, emptyList());
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// XXX: Query Object Model
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
NaturalFullJoin construct(
|
||||
Table<?> table1,
|
||||
Collection<? extends Field<?>> partitionBy1,
|
||||
Collection<? extends Field<?>> partitionBy2,
|
||||
Table<?> table2,
|
||||
Condition o,
|
||||
Collection<? extends Field<?>> u
|
||||
) {
|
||||
// [#6116] [#11687] TODO: Partition by clauses
|
||||
return new NaturalFullJoin(table1, table2);
|
||||
}
|
||||
}
|
||||
78
jOOQ/src/main/java/org/jooq/impl/NaturalJoin.java
Normal file
78
jOOQ/src/main/java/org/jooq/impl/NaturalJoin.java
Normal file
@ -0,0 +1,78 @@
|
||||
/*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* Other licenses:
|
||||
* -----------------------------------------------------------------------------
|
||||
* Commercial licenses for this work are available. These replace the above
|
||||
* ASL 2.0 and offer limited warranties, support, maintenance, and commercial
|
||||
* database integrations.
|
||||
*
|
||||
* For more information, please visit: https://www.jooq.org/legal/licensing
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.jooq.impl;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import org.jooq.Condition;
|
||||
import org.jooq.Field;
|
||||
import org.jooq.JoinType;
|
||||
import org.jooq.Record;
|
||||
import org.jooq.Table;
|
||||
import org.jooq.TableLike;
|
||||
|
||||
/**
|
||||
* @author Lukas Eder
|
||||
*/
|
||||
final class NaturalJoin
|
||||
extends
|
||||
JoinTable<NaturalJoin>
|
||||
implements
|
||||
QOM.NaturalJoin<Record>
|
||||
{
|
||||
|
||||
NaturalJoin(TableLike<?> lhs, TableLike<?> rhs) {
|
||||
super(lhs, rhs, JoinType.NATURAL_JOIN);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// XXX: Query Object Model
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
NaturalJoin construct(
|
||||
Table<?> table1,
|
||||
Collection<? extends Field<?>> partitionBy1,
|
||||
Collection<? extends Field<?>> partitionBy2,
|
||||
Table<?> table2,
|
||||
Condition o,
|
||||
Collection<? extends Field<?>> u
|
||||
) {
|
||||
return new NaturalJoin(table1, table2);
|
||||
}
|
||||
}
|
||||
81
jOOQ/src/main/java/org/jooq/impl/NaturalLeftJoin.java
Normal file
81
jOOQ/src/main/java/org/jooq/impl/NaturalLeftJoin.java
Normal file
@ -0,0 +1,81 @@
|
||||
/*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* Other licenses:
|
||||
* -----------------------------------------------------------------------------
|
||||
* Commercial licenses for this work are available. These replace the above
|
||||
* ASL 2.0 and offer limited warranties, support, maintenance, and commercial
|
||||
* database integrations.
|
||||
*
|
||||
* For more information, please visit: https://www.jooq.org/legal/licensing
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.jooq.impl;
|
||||
|
||||
import static java.util.Collections.emptyList;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import org.jooq.Condition;
|
||||
import org.jooq.Field;
|
||||
import org.jooq.JoinType;
|
||||
import org.jooq.Record;
|
||||
import org.jooq.Table;
|
||||
import org.jooq.TableLike;
|
||||
|
||||
/**
|
||||
* @author Lukas Eder
|
||||
*/
|
||||
final class NaturalLeftJoin
|
||||
extends
|
||||
JoinTable<NaturalLeftJoin>
|
||||
implements
|
||||
QOM.NaturalLeftJoin<Record>
|
||||
{
|
||||
|
||||
NaturalLeftJoin(TableLike<?> lhs, TableLike<?> rhs) {
|
||||
super(lhs, rhs, JoinType.NATURAL_LEFT_OUTER_JOIN, emptyList());
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// XXX: Query Object Model
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
NaturalLeftJoin construct(
|
||||
Table<?> table1,
|
||||
Collection<? extends Field<?>> partitionBy1,
|
||||
Collection<? extends Field<?>> partitionBy2,
|
||||
Table<?> table2,
|
||||
Condition o,
|
||||
Collection<? extends Field<?>> u
|
||||
) {
|
||||
// [#6116] [#11687] TODO: Partition by clauses
|
||||
return new NaturalLeftJoin(table1, table2);
|
||||
}
|
||||
}
|
||||
81
jOOQ/src/main/java/org/jooq/impl/NaturalRightJoin.java
Normal file
81
jOOQ/src/main/java/org/jooq/impl/NaturalRightJoin.java
Normal file
@ -0,0 +1,81 @@
|
||||
/*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* Other licenses:
|
||||
* -----------------------------------------------------------------------------
|
||||
* Commercial licenses for this work are available. These replace the above
|
||||
* ASL 2.0 and offer limited warranties, support, maintenance, and commercial
|
||||
* database integrations.
|
||||
*
|
||||
* For more information, please visit: https://www.jooq.org/legal/licensing
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.jooq.impl;
|
||||
|
||||
import static java.util.Collections.emptyList;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import org.jooq.Condition;
|
||||
import org.jooq.Field;
|
||||
import org.jooq.JoinType;
|
||||
import org.jooq.Record;
|
||||
import org.jooq.Table;
|
||||
import org.jooq.TableLike;
|
||||
|
||||
/**
|
||||
* @author Lukas Eder
|
||||
*/
|
||||
final class NaturalRightJoin
|
||||
extends
|
||||
JoinTable<NaturalRightJoin>
|
||||
implements
|
||||
QOM.NaturalRightJoin<Record>
|
||||
{
|
||||
|
||||
NaturalRightJoin(TableLike<?> lhs, TableLike<?> rhs) {
|
||||
super(lhs, rhs, JoinType.NATURAL_RIGHT_OUTER_JOIN, emptyList());
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// XXX: Query Object Model
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
NaturalRightJoin construct(
|
||||
Table<?> table1,
|
||||
Collection<? extends Field<?>> partitionBy1,
|
||||
Collection<? extends Field<?>> partitionBy2,
|
||||
Table<?> table2,
|
||||
Condition o,
|
||||
Collection<? extends Field<?>> u
|
||||
) {
|
||||
// [#6116] [#11687] TODO: Partition by clauses
|
||||
return new NaturalRightJoin(table1, table2);
|
||||
}
|
||||
}
|
||||
78
jOOQ/src/main/java/org/jooq/impl/OuterApply.java
Normal file
78
jOOQ/src/main/java/org/jooq/impl/OuterApply.java
Normal file
@ -0,0 +1,78 @@
|
||||
/*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* Other licenses:
|
||||
* -----------------------------------------------------------------------------
|
||||
* Commercial licenses for this work are available. These replace the above
|
||||
* ASL 2.0 and offer limited warranties, support, maintenance, and commercial
|
||||
* database integrations.
|
||||
*
|
||||
* For more information, please visit: https://www.jooq.org/legal/licensing
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.jooq.impl;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import org.jooq.Condition;
|
||||
import org.jooq.Field;
|
||||
import org.jooq.JoinType;
|
||||
import org.jooq.Record;
|
||||
import org.jooq.Table;
|
||||
import org.jooq.TableLike;
|
||||
|
||||
/**
|
||||
* @author Lukas Eder
|
||||
*/
|
||||
final class OuterApply
|
||||
extends
|
||||
JoinTable<OuterApply>
|
||||
implements
|
||||
QOM.OuterApply<Record>
|
||||
{
|
||||
|
||||
OuterApply(TableLike<?> lhs, TableLike<?> rhs) {
|
||||
super(lhs, rhs, JoinType.OUTER_APPLY);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// XXX: Query Object Model
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
OuterApply construct(
|
||||
Table<?> table1,
|
||||
Collection<? extends Field<?>> partitionBy1,
|
||||
Collection<? extends Field<?>> partitionBy2,
|
||||
Table<?> table2,
|
||||
Condition o,
|
||||
Collection<? extends Field<?>> u
|
||||
) {
|
||||
return new OuterApply(table1, table2);
|
||||
}
|
||||
}
|
||||
79
jOOQ/src/main/java/org/jooq/impl/RightJoin.java
Normal file
79
jOOQ/src/main/java/org/jooq/impl/RightJoin.java
Normal file
@ -0,0 +1,79 @@
|
||||
/*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* Other licenses:
|
||||
* -----------------------------------------------------------------------------
|
||||
* Commercial licenses for this work are available. These replace the above
|
||||
* ASL 2.0 and offer limited warranties, support, maintenance, and commercial
|
||||
* database integrations.
|
||||
*
|
||||
* For more information, please visit: https://www.jooq.org/legal/licensing
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.jooq.impl;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import org.jooq.Condition;
|
||||
import org.jooq.Field;
|
||||
import org.jooq.JoinType;
|
||||
import org.jooq.Record;
|
||||
import org.jooq.Table;
|
||||
import org.jooq.TableLike;
|
||||
|
||||
/**
|
||||
* @author Lukas Eder
|
||||
*/
|
||||
final class RightJoin
|
||||
extends
|
||||
JoinTable<RightJoin>
|
||||
implements
|
||||
QOM.RightJoin<Record>
|
||||
{
|
||||
|
||||
RightJoin(TableLike<?> lhs, TableLike<?> rhs) {
|
||||
super(lhs, rhs, JoinType.RIGHT_OUTER_JOIN);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// XXX: Query Object Model
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
RightJoin construct(
|
||||
Table<?> table1,
|
||||
Collection<? extends Field<?>> partitionBy1,
|
||||
Collection<? extends Field<?>> partitionBy2,
|
||||
Table<?> table2,
|
||||
Condition o,
|
||||
Collection<? extends Field<?>> u
|
||||
) {
|
||||
// [#6116] [#11687] TODO: Partition by clauses
|
||||
return o != null ? new RightJoin(table1, table2).on(o) : new RightJoin(table1, table2).using(u);
|
||||
}
|
||||
}
|
||||
78
jOOQ/src/main/java/org/jooq/impl/StraightJoin.java
Normal file
78
jOOQ/src/main/java/org/jooq/impl/StraightJoin.java
Normal file
@ -0,0 +1,78 @@
|
||||
/*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* Other licenses:
|
||||
* -----------------------------------------------------------------------------
|
||||
* Commercial licenses for this work are available. These replace the above
|
||||
* ASL 2.0 and offer limited warranties, support, maintenance, and commercial
|
||||
* database integrations.
|
||||
*
|
||||
* For more information, please visit: https://www.jooq.org/legal/licensing
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.jooq.impl;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import org.jooq.Condition;
|
||||
import org.jooq.Field;
|
||||
import org.jooq.JoinType;
|
||||
import org.jooq.Record;
|
||||
import org.jooq.Table;
|
||||
import org.jooq.TableLike;
|
||||
|
||||
/**
|
||||
* @author Lukas Eder
|
||||
*/
|
||||
final class StraightJoin
|
||||
extends
|
||||
JoinTable<StraightJoin>
|
||||
implements
|
||||
QOM.StraightJoin<Record>
|
||||
{
|
||||
|
||||
StraightJoin(TableLike<?> lhs, TableLike<?> rhs) {
|
||||
super(lhs, rhs, JoinType.STRAIGHT_JOIN);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// XXX: Query Object Model
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
StraightJoin construct(
|
||||
Table<?> table1,
|
||||
Collection<? extends Field<?>> partitionBy1,
|
||||
Collection<? extends Field<?>> partitionBy2,
|
||||
Table<?> table2,
|
||||
Condition o,
|
||||
Collection<? extends Field<?>> u
|
||||
) {
|
||||
return o != null ? new StraightJoin(table1, table2).on(o) : new StraightJoin(table1, table2).using(u);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user