From bc5de9c233b05048bae4d6ce709367a080bbcc9b Mon Sep 17 00:00:00 2001 From: Lukas Eder Date: Sat, 13 Nov 2021 16:47:35 +0100 Subject: [PATCH] [jOOQ/jOOQ#982] Add support for GIS extensions - Support ST_GeometryN, ST_NumGeometries --- jOOQ/src/main/java/org/jooq/impl/DSL.java | 188 +++++++++++++++++ jOOQ/src/main/java/org/jooq/impl/Names.java | 5 + .../main/java/org/jooq/impl/ParserImpl.java | 40 ++++ jOOQ/src/main/java/org/jooq/impl/QOM.java | 84 ++++++++ .../java/org/jooq/impl/StExteriorRing.java | 173 ++++++++++++++++ .../main/java/org/jooq/impl/StGeometryN.java | 191 ++++++++++++++++++ .../java/org/jooq/impl/StInteriorRingN.java | 191 ++++++++++++++++++ .../java/org/jooq/impl/StNumGeometries.java | 173 ++++++++++++++++ .../java/org/jooq/impl/StNumInteriorRing.java | 173 ++++++++++++++++ 9 files changed, 1218 insertions(+) create mode 100644 jOOQ/src/main/java/org/jooq/impl/StExteriorRing.java create mode 100644 jOOQ/src/main/java/org/jooq/impl/StGeometryN.java create mode 100644 jOOQ/src/main/java/org/jooq/impl/StInteriorRingN.java create mode 100644 jOOQ/src/main/java/org/jooq/impl/StNumGeometries.java create mode 100644 jOOQ/src/main/java/org/jooq/impl/StNumInteriorRing.java diff --git a/jOOQ/src/main/java/org/jooq/impl/DSL.java b/jOOQ/src/main/java/org/jooq/impl/DSL.java index 8339db8975..6e156192e6 100644 --- a/jOOQ/src/main/java/org/jooq/impl/DSL.java +++ b/jOOQ/src/main/java/org/jooq/impl/DSL.java @@ -21439,6 +21439,194 @@ 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 5c8c00cdad..1dabb486da 100644 --- a/jOOQ/src/main/java/org/jooq/impl/Names.java +++ b/jOOQ/src/main/java/org/jooq/impl/Names.java @@ -435,13 +435,18 @@ final class Names { static final Name N_ST_DISTANCE = unquotedName("st_distance"); static final Name N_ST_ENDPOINT = unquotedName("st_endpoint"); static final Name N_ST_EQUALS = unquotedName("st_equals"); + static final Name N_ST_EXTERIORRING = unquotedName("st_exteriorring"); + static final Name N_ST_GEOMETRYN = unquotedName("st_geometryn"); static final Name N_ST_GEOMETRYTYPE = unquotedName("st_geometrytype"); static final Name N_ST_GEOMFROMTEXT = unquotedName("st_geomfromtext"); + static final Name N_ST_INTERIORRINGN = unquotedName("st_interiorringn"); static final Name N_ST_INTERSECTION = unquotedName("st_intersection"); static final Name N_ST_INTERSECTS = unquotedName("st_intersects"); static final Name N_ST_ISCLOSED = unquotedName("st_isclosed"); static final Name N_ST_ISEMPTY = unquotedName("st_isempty"); static final Name N_ST_LENGTH = unquotedName("st_length"); + static final Name N_ST_NUMGEOMETRIES = unquotedName("st_numgeometries"); + static final Name N_ST_NUMINTERIORRING = unquotedName("st_numinteriorring"); static final Name N_ST_NUMPOINTS = unquotedName("st_numpoints"); static final Name N_ST_OVERLAPS = unquotedName("st_overlaps"); static final Name N_ST_POINTN = unquotedName("st_pointn"); diff --git a/jOOQ/src/main/java/org/jooq/impl/ParserImpl.java b/jOOQ/src/main/java/org/jooq/impl/ParserImpl.java index c8c1b96f6e..103be31a9e 100644 --- a/jOOQ/src/main/java/org/jooq/impl/ParserImpl.java +++ b/jOOQ/src/main/java/org/jooq/impl/ParserImpl.java @@ -325,6 +325,11 @@ 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; @@ -7763,6 +7768,16 @@ final class DefaultParseContext extends AbstractScope implements ParseContext { + + + + + + + + + + @@ -8364,6 +8379,16 @@ final class DefaultParseContext extends AbstractScope implements ParseContext { + } + else if (parseFunctionNameIf("ST_EXTERIORRING") && requireProEdition()) { + + + + } + else if (parseFunctionNameIf("ST_GEOMETRYN") && requireProEdition()) { + + + } else if (parseFunctionNameIf("ST_GEOMETRYTYPE") && requireProEdition()) { @@ -8374,6 +8399,11 @@ final class DefaultParseContext extends AbstractScope implements ParseContext { + } + else if (parseFunctionNameIf("ST_INTERIORRINGN") && requireProEdition()) { + + + } else if (parseFunctionNameIf("ST_INTERSECTION") && requireProEdition()) { @@ -8384,6 +8414,16 @@ final class DefaultParseContext extends AbstractScope implements ParseContext { + } + else if (parseFunctionNameIf("ST_NUMINTERIORRING", "ST_NUMINTERIORRINGS") && requireProEdition()) { + + + + } + else if (parseFunctionNameIf("ST_NUMGEOMETRIES") && requireProEdition()) { + + + } else if (parseFunctionNameIf("ST_NUMPOINTS") && requireProEdition()) { diff --git a/jOOQ/src/main/java/org/jooq/impl/QOM.java b/jOOQ/src/main/java/org/jooq/impl/QOM.java index fa0905a159..b11b4abaf1 100644 --- a/jOOQ/src/main/java/org/jooq/impl/QOM.java +++ b/jOOQ/src/main/java/org/jooq/impl/QOM.java @@ -5400,6 +5400,90 @@ public final class QOM { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jOOQ/src/main/java/org/jooq/impl/StExteriorRing.java b/jOOQ/src/main/java/org/jooq/impl/StExteriorRing.java new file mode 100644 index 0000000000..672b7e22cc --- /dev/null +++ b/jOOQ/src/main/java/org/jooq/impl/StExteriorRing.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; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jOOQ/src/main/java/org/jooq/impl/StGeometryN.java b/jOOQ/src/main/java/org/jooq/impl/StGeometryN.java new file mode 100644 index 0000000000..255d7e8f08 --- /dev/null +++ b/jOOQ/src/main/java/org/jooq/impl/StGeometryN.java @@ -0,0 +1,191 @@ +/* + * 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; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jOOQ/src/main/java/org/jooq/impl/StInteriorRingN.java b/jOOQ/src/main/java/org/jooq/impl/StInteriorRingN.java new file mode 100644 index 0000000000..255d7e8f08 --- /dev/null +++ b/jOOQ/src/main/java/org/jooq/impl/StInteriorRingN.java @@ -0,0 +1,191 @@ +/* + * 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; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jOOQ/src/main/java/org/jooq/impl/StNumGeometries.java b/jOOQ/src/main/java/org/jooq/impl/StNumGeometries.java new file mode 100644 index 0000000000..672b7e22cc --- /dev/null +++ b/jOOQ/src/main/java/org/jooq/impl/StNumGeometries.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; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jOOQ/src/main/java/org/jooq/impl/StNumInteriorRing.java b/jOOQ/src/main/java/org/jooq/impl/StNumInteriorRing.java new file mode 100644 index 0000000000..672b7e22cc --- /dev/null +++ b/jOOQ/src/main/java/org/jooq/impl/StNumInteriorRing.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; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +