From ebc4d8d6e2883ade8dfa1e59ab30c3d1e0d88175 Mon Sep 17 00:00:00 2001 From: Lukas Eder Date: Sat, 13 Nov 2021 15:53:32 +0100 Subject: [PATCH] [jOOQ/jOOQ#982] Add support for GIS extensions - Support ST_Centroid --- jOOQ/src/main/java/org/jooq/impl/DSL.java | 26 +++ jOOQ/src/main/java/org/jooq/impl/Names.java | 1 + .../main/java/org/jooq/impl/ParserImpl.java | 8 + jOOQ/src/main/java/org/jooq/impl/QOM.java | 16 ++ .../main/java/org/jooq/impl/StCentroid.java | 173 ++++++++++++++++++ 5 files changed, 224 insertions(+) create mode 100644 jOOQ/src/main/java/org/jooq/impl/StCentroid.java diff --git a/jOOQ/src/main/java/org/jooq/impl/DSL.java b/jOOQ/src/main/java/org/jooq/impl/DSL.java index 3a15d7c2c0..8339db8975 100644 --- a/jOOQ/src/main/java/org/jooq/impl/DSL.java +++ b/jOOQ/src/main/java/org/jooq/impl/DSL.java @@ -21413,6 +21413,32 @@ public class DSL { + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jOOQ/src/main/java/org/jooq/impl/Names.java b/jOOQ/src/main/java/org/jooq/impl/Names.java index 9bcc66fe9c..5c8c00cdad 100644 --- a/jOOQ/src/main/java/org/jooq/impl/Names.java +++ b/jOOQ/src/main/java/org/jooq/impl/Names.java @@ -428,6 +428,7 @@ final class Names { static final Name N_STDDEV_SAMP = unquotedName("stddev_samp"); static final Name N_ST_AREA = unquotedName("st_area"); static final Name N_ST_ASTEXT = unquotedName("st_astext"); + static final Name N_ST_CENTROID = unquotedName("st_centroid"); static final Name N_ST_CONTAINS = unquotedName("st_contains"); static final Name N_ST_CROSSES = unquotedName("st_crosses"); static final Name N_ST_DISJOINT = unquotedName("st_disjoint"); diff --git a/jOOQ/src/main/java/org/jooq/impl/ParserImpl.java b/jOOQ/src/main/java/org/jooq/impl/ParserImpl.java index 8fb13db4c1..c8c1b96f6e 100644 --- a/jOOQ/src/main/java/org/jooq/impl/ParserImpl.java +++ b/jOOQ/src/main/java/org/jooq/impl/ParserImpl.java @@ -324,6 +324,7 @@ import static org.jooq.impl.DSL.square; // ... // ... // ... +// ... import static org.jooq.impl.DSL.stddevPop; import static org.jooq.impl.DSL.stddevSamp; import static org.jooq.impl.DSL.sum; @@ -7768,6 +7769,8 @@ final class DefaultParseContext extends AbstractScope implements ParseContext { + + @@ -8346,6 +8349,11 @@ final class DefaultParseContext extends AbstractScope implements ParseContext { + } + else if (parseFunctionNameIf("ST_CENTROID") && requireProEdition()) { + + + } else if (parseFunctionNameIf("ST_DISTANCE") && requireProEdition()) { diff --git a/jOOQ/src/main/java/org/jooq/impl/QOM.java b/jOOQ/src/main/java/org/jooq/impl/QOM.java index 76baf94eb5..fa0905a159 100644 --- a/jOOQ/src/main/java/org/jooq/impl/QOM.java +++ b/jOOQ/src/main/java/org/jooq/impl/QOM.java @@ -5388,6 +5388,22 @@ public final class QOM { + + + + + + + + + + + + + + + + diff --git a/jOOQ/src/main/java/org/jooq/impl/StCentroid.java b/jOOQ/src/main/java/org/jooq/impl/StCentroid.java new file mode 100644 index 0000000000..672b7e22cc --- /dev/null +++ b/jOOQ/src/main/java/org/jooq/impl/StCentroid.java @@ -0,0 +1,173 @@ +/* + * 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 + * + * http://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: http://www.jooq.org/licenses + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + */ +package org.jooq.impl; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +