From 76fd72b68fc8714e068c4fdfdb1dd09e527441dc Mon Sep 17 00:00:00 2001 From: Lukas Eder Date: Tue, 18 Jun 2024 09:44:05 +0200 Subject: [PATCH] [jOOQ/jOOQ#12736] More spatial support - ST_Perimeter - ST_XMIN - ST_XMAX - ST_YMIN - ST_YMAX - ST_ZMIN - ST_ZMAX --- jOOQ/src/main/java/org/jooq/impl/DSL.java | 184 ++++++++++++++++++ jOOQ/src/main/java/org/jooq/impl/Names.java | 7 + .../main/java/org/jooq/impl/ParserImpl.java | 69 +++++++ jOOQ/src/main/java/org/jooq/impl/QOM.java | 141 ++++++++++++++ .../main/java/org/jooq/impl/StPerimeter.java | 157 +++++++++++++++ jOOQ/src/main/java/org/jooq/impl/StXMax.java | 167 ++++++++++++++++ jOOQ/src/main/java/org/jooq/impl/StXMin.java | 167 ++++++++++++++++ jOOQ/src/main/java/org/jooq/impl/StYMax.java | 167 ++++++++++++++++ jOOQ/src/main/java/org/jooq/impl/StYMin.java | 167 ++++++++++++++++ jOOQ/src/main/java/org/jooq/impl/StZMax.java | 167 ++++++++++++++++ jOOQ/src/main/java/org/jooq/impl/StZMin.java | 167 ++++++++++++++++ 11 files changed, 1560 insertions(+) create mode 100644 jOOQ/src/main/java/org/jooq/impl/StPerimeter.java create mode 100644 jOOQ/src/main/java/org/jooq/impl/StXMax.java create mode 100644 jOOQ/src/main/java/org/jooq/impl/StXMin.java create mode 100644 jOOQ/src/main/java/org/jooq/impl/StYMax.java create mode 100644 jOOQ/src/main/java/org/jooq/impl/StYMin.java create mode 100644 jOOQ/src/main/java/org/jooq/impl/StZMax.java create mode 100644 jOOQ/src/main/java/org/jooq/impl/StZMin.java diff --git a/jOOQ/src/main/java/org/jooq/impl/DSL.java b/jOOQ/src/main/java/org/jooq/impl/DSL.java index 0ee3de3473..e585a2df9a 100644 --- a/jOOQ/src/main/java/org/jooq/impl/DSL.java +++ b/jOOQ/src/main/java/org/jooq/impl/DSL.java @@ -26802,6 +26802,190 @@ 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 90cfe6d635..378018c55f 100644 --- a/jOOQ/src/main/java/org/jooq/impl/Names.java +++ b/jOOQ/src/main/java/org/jooq/impl/Names.java @@ -627,6 +627,7 @@ final class Names { static final Name N_ST_NUMINTERIORRINGS = systemName("st_numinteriorrings"); static final Name N_ST_NUMPOINTS = systemName("st_numpoints"); static final Name N_ST_OVERLAPS = systemName("st_overlaps"); + static final Name N_ST_PERIMETER = systemName("st_perimeter"); static final Name N_ST_POINTN = systemName("st_pointn"); static final Name N_ST_SRID = systemName("st_srid"); static final Name N_ST_STARTPOINT = systemName("st_startpoint"); @@ -634,8 +635,14 @@ final class Names { static final Name N_ST_UNION = systemName("st_union"); static final Name N_ST_WITHIN = systemName("st_within"); static final Name N_ST_X = systemName("st_x"); + static final Name N_ST_XMAX = systemName("st_xmax"); + static final Name N_ST_XMIN = systemName("st_xmin"); static final Name N_ST_Y = systemName("st_y"); + static final Name N_ST_YMAX = systemName("st_ymax"); + static final Name N_ST_YMIN = systemName("st_ymin"); static final Name N_ST_Z = systemName("st_z"); + static final Name N_ST_ZMAX = systemName("st_zmax"); + static final Name N_ST_ZMIN = systemName("st_zmin"); static final Name N_SUBSTRING = systemName("substring"); static final Name N_SUBSTRING_INDEX = systemName("substring_index"); static final Name N_SUFFIX = systemName("suffix"); diff --git a/jOOQ/src/main/java/org/jooq/impl/ParserImpl.java b/jOOQ/src/main/java/org/jooq/impl/ParserImpl.java index 0ed103dc92..22101aa94e 100644 --- a/jOOQ/src/main/java/org/jooq/impl/ParserImpl.java +++ b/jOOQ/src/main/java/org/jooq/impl/ParserImpl.java @@ -377,6 +377,12 @@ 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; @@ -9607,6 +9613,11 @@ final class DefaultParseContext extends AbstractScope implements ParseContext { + } + else if (!ignoreProEdition() && parseFunctionNameIf("ST_PERIMETER") && requireProEdition()) { + + + } else if (!ignoreProEdition() && parseFunctionNameIf("ST_POINTN") && requireProEdition()) { @@ -9632,21 +9643,79 @@ final class DefaultParseContext extends AbstractScope implements ParseContext { + } + else if (!ignoreProEdition() && parseFunctionNameIf("SDO_GEOM.SDO_MIN_MBR_ORDINATE") && requireProEdition()) { + + + + + + + + + + + + + } + else if (!ignoreProEdition() && parseFunctionNameIf("SDO_GEOM.SDO_MAX_MBR_ORDINATE") && requireProEdition()) { + + + + + + + + + + + + } else if (!ignoreProEdition() && parseFunctionNameIf("ST_X") && requireProEdition()) { + } + else if (!ignoreProEdition() && parseFunctionNameIf("ST_XMIN") && requireProEdition()) { + + + + } + else if (!ignoreProEdition() && parseFunctionNameIf("ST_XMAX") && requireProEdition()) { + + + } else if (!ignoreProEdition() && parseFunctionNameIf("ST_Y") && requireProEdition()) { + } + else if (!ignoreProEdition() && parseFunctionNameIf("ST_YMIN") && requireProEdition()) { + + + + } + else if (!ignoreProEdition() && parseFunctionNameIf("ST_YMAX") && requireProEdition()) { + + + } else if (!ignoreProEdition() && parseFunctionNameIf("ST_Z") && requireProEdition()) { + } + else if (!ignoreProEdition() && parseFunctionNameIf("ST_ZMIN") && requireProEdition()) { + + + + } + else if (!ignoreProEdition() && parseFunctionNameIf("ST_ZMAX") && requireProEdition()) { + + + } else if (parseFunctionNameIf("SUB", "SUBTRACT")) return parseFunctionArgs2(Field::sub); diff --git a/jOOQ/src/main/java/org/jooq/impl/QOM.java b/jOOQ/src/main/java/org/jooq/impl/QOM.java index 4d76627275..0fbe860dd1 100644 --- a/jOOQ/src/main/java/org/jooq/impl/QOM.java +++ b/jOOQ/src/main/java/org/jooq/impl/QOM.java @@ -9335,6 +9335,147 @@ public final class QOM { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jOOQ/src/main/java/org/jooq/impl/StPerimeter.java b/jOOQ/src/main/java/org/jooq/impl/StPerimeter.java new file mode 100644 index 0000000000..33226eb64d --- /dev/null +++ b/jOOQ/src/main/java/org/jooq/impl/StPerimeter.java @@ -0,0 +1,157 @@ +/* + * 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; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jOOQ/src/main/java/org/jooq/impl/StXMax.java b/jOOQ/src/main/java/org/jooq/impl/StXMax.java new file mode 100644 index 0000000000..0ff7a3c538 --- /dev/null +++ b/jOOQ/src/main/java/org/jooq/impl/StXMax.java @@ -0,0 +1,167 @@ +/* + * 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; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jOOQ/src/main/java/org/jooq/impl/StXMin.java b/jOOQ/src/main/java/org/jooq/impl/StXMin.java new file mode 100644 index 0000000000..0ff7a3c538 --- /dev/null +++ b/jOOQ/src/main/java/org/jooq/impl/StXMin.java @@ -0,0 +1,167 @@ +/* + * 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; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jOOQ/src/main/java/org/jooq/impl/StYMax.java b/jOOQ/src/main/java/org/jooq/impl/StYMax.java new file mode 100644 index 0000000000..0ff7a3c538 --- /dev/null +++ b/jOOQ/src/main/java/org/jooq/impl/StYMax.java @@ -0,0 +1,167 @@ +/* + * 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; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jOOQ/src/main/java/org/jooq/impl/StYMin.java b/jOOQ/src/main/java/org/jooq/impl/StYMin.java new file mode 100644 index 0000000000..0ff7a3c538 --- /dev/null +++ b/jOOQ/src/main/java/org/jooq/impl/StYMin.java @@ -0,0 +1,167 @@ +/* + * 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; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jOOQ/src/main/java/org/jooq/impl/StZMax.java b/jOOQ/src/main/java/org/jooq/impl/StZMax.java new file mode 100644 index 0000000000..0ff7a3c538 --- /dev/null +++ b/jOOQ/src/main/java/org/jooq/impl/StZMax.java @@ -0,0 +1,167 @@ +/* + * 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; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jOOQ/src/main/java/org/jooq/impl/StZMin.java b/jOOQ/src/main/java/org/jooq/impl/StZMin.java new file mode 100644 index 0000000000..0ff7a3c538 --- /dev/null +++ b/jOOQ/src/main/java/org/jooq/impl/StZMin.java @@ -0,0 +1,167 @@ +/* + * 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; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +