Skip to content

Commit 30ae066

Browse files
committed
DEVEXP-563 Added geohashSubhashes to Optic plan builder
This is all the code-generated stuff for DEVEXP-563. Will use a second PR for the manually-added stuff. Most of this is just copyright updates that were made by the code generator. Note that the code generator also updated PlanGeneratorTest. We have some manual mods in there so that some tests only run on MarkLogic 11, so I had to ensure those were retained.
1 parent 421350d commit 30ae066

27 files changed

+110
-89
lines changed

marklogic-client-api/src/main/java/com/marklogic/client/expression/CtsExpr.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022 MarkLogic Corporation
2+
* Copyright (c) 2023 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -3240,7 +3240,7 @@ public interface CtsExpr {
32403240
* @return a CtsCircleSeqExpr sequence
32413241
*/
32423242
public CtsCircleSeqExpr circleSeq(CtsCircleExpr... items);
3243-
3243+
32443244
/**
32453245
* Constructs a sequence of CtsPeriodExpr items.
32463246
* @param items the CtsPeriodExpr items collected by the sequence

marklogic-client-api/src/main/java/com/marklogic/client/expression/FnExpr.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022 MarkLogic Corporation
2+
* Copyright (c) 2023 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

marklogic-client-api/src/main/java/com/marklogic/client/expression/GeoExpr.java

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022 MarkLogic Corporation
2+
* Copyright (c) 2023 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -767,6 +767,17 @@ public interface GeoExpr {
767767
* @return a server expression with the <a href="{@docRoot}/doc-files/types/xs_double.html">xs:double</a> server data type
768768
*/
769769
public ServerExpression geohashPrecisionDimensions(ServerExpression precision);
770+
/**
771+
* Given a geohash string, return the 32 subhashes.
772+
*
773+
* <a name="ml-server-type-geohash-subhashes"></a>
774+
775+
* <p>
776+
* Provides a client interface to the <a href="http://docs.marklogic.com/geo:geohash-subhashes" target="mlserverdoc">geo:geohash-subhashes</a> server function.
777+
* @param hash The geohash string, as produced from the function geo:geohash-encode. (of <a href="{@docRoot}/doc-files/types/xs_string.html">xs:string</a>)
778+
* @return a server expression with the <a href="{@docRoot}/doc-files/types/xs_string.html">xs:string</a> server data type
779+
*/
780+
public ServerExpression geohashSubhashes(ServerExpression hash);
770781
/**
771782
* Given a geohash string, return the 32 subhashes.
772783
* <p>
@@ -778,9 +789,6 @@ public interface GeoExpr {
778789
public ServerExpression geohashSubhashes(ServerExpression hash, String which);
779790
/**
780791
* Given a geohash string, return the 32 subhashes.
781-
*
782-
* <a name="ml-server-type-geohash-subhashes"></a>
783-
784792
* <p>
785793
* Provides a client interface to the <a href="http://docs.marklogic.com/geo:geohash-subhashes" target="mlserverdoc">geo:geohash-subhashes</a> server function.
786794
* @param hash The geohash string, as produced from the function geo:geohash-encode. (of <a href="{@docRoot}/doc-files/types/xs_string.html">xs:string</a>)

marklogic-client-api/src/main/java/com/marklogic/client/expression/JsonExpr.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022 MarkLogic Corporation
2+
* Copyright (c) 2023 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

marklogic-client-api/src/main/java/com/marklogic/client/expression/MapExpr.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022 MarkLogic Corporation
2+
* Copyright (c) 2023 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

marklogic-client-api/src/main/java/com/marklogic/client/expression/MathExpr.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022 MarkLogic Corporation
2+
* Copyright (c) 2023 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

marklogic-client-api/src/main/java/com/marklogic/client/expression/PlanBuilder.java

Lines changed: 34 additions & 36 deletions
Large diffs are not rendered by default.

marklogic-client-api/src/main/java/com/marklogic/client/expression/RdfExpr.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022 MarkLogic Corporation
2+
* Copyright (c) 2023 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

marklogic-client-api/src/main/java/com/marklogic/client/expression/SemExpr.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022 MarkLogic Corporation
2+
* Copyright (c) 2023 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

marklogic-client-api/src/main/java/com/marklogic/client/expression/SpellExpr.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022 MarkLogic Corporation
2+
* Copyright (c) 2023 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

marklogic-client-api/src/main/java/com/marklogic/client/expression/SqlExpr.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022 MarkLogic Corporation
2+
* Copyright (c) 2023 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

marklogic-client-api/src/main/java/com/marklogic/client/expression/XdmpExpr.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022 MarkLogic Corporation
2+
* Copyright (c) 2023 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -177,7 +177,7 @@ public interface XdmpExpr {
177177
* <p>
178178
* Provides a client interface to the <a href="http://docs.marklogic.com/xdmp:describe" target="mlserverdoc">xdmp:describe</a> server function.
179179
* @param item The item sequence whose description is returned. (of <a href="{@docRoot}/doc-files/types/item.html">item</a>)
180-
* @param maxSequenceLength Represents the maximum number of items per sequence to print. The default is 3. () means no maximum. (of <a href="{@docRoot}/doc-files/types/xs_unsignedInt.html">xs:unsignedInt</a>)
180+
* @param maxSequenceLength Represents the maximum number of items per sequence to print. The default is 3. (of <a href="{@docRoot}/doc-files/types/xs_unsignedInt.html">xs:unsignedInt</a>)
181181
* @return a server expression with the <a href="{@docRoot}/doc-files/types/xs_string.html">xs:string</a> server data type
182182
*/
183183
public ServerExpression describe(ServerExpression item, ServerExpression maxSequenceLength);
@@ -186,8 +186,8 @@ public interface XdmpExpr {
186186
* <p>
187187
* Provides a client interface to the <a href="http://docs.marklogic.com/xdmp:describe" target="mlserverdoc">xdmp:describe</a> server function.
188188
* @param item The item sequence whose description is returned. (of <a href="{@docRoot}/doc-files/types/item.html">item</a>)
189-
* @param maxSequenceLength Represents the maximum number of items per sequence to print. The default is 3. () means no maximum. (of <a href="{@docRoot}/doc-files/types/xs_unsignedInt.html">xs:unsignedInt</a>)
190-
* @param maxItemLength Represents the maximum number of characters per item to print. The default is 64. The minimum is 8. () means no limit. (of <a href="{@docRoot}/doc-files/types/xs_unsignedInt.html">xs:unsignedInt</a>)
189+
* @param maxSequenceLength Represents the maximum number of items per sequence to print. The default is 3. (of <a href="{@docRoot}/doc-files/types/xs_unsignedInt.html">xs:unsignedInt</a>)
190+
* @param maxItemLength Represents the maximum number of characters per item to print. The default is 64. The minimum is 8. (of <a href="{@docRoot}/doc-files/types/xs_unsignedInt.html">xs:unsignedInt</a>)
191191
* @return a server expression with the <a href="{@docRoot}/doc-files/types/xs_string.html">xs:string</a> server data type
192192
*/
193193
public ServerExpression describe(ServerExpression item, ServerExpression maxSequenceLength, ServerExpression maxItemLength);

marklogic-client-api/src/main/java/com/marklogic/client/expression/XsExpr.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022 MarkLogic Corporation
2+
* Copyright (c) 2023 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

marklogic-client-api/src/main/java/com/marklogic/client/impl/CtsExprImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022 MarkLogic Corporation
2+
* Copyright (c) 2023 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -184,7 +184,7 @@ public ServerExpression boxWest(ServerExpression box) {
184184
return new XsExprImpl.NumericCallImpl("cts", "box-west", new Object[]{ box });
185185
}
186186

187-
187+
188188
@Override
189189
public CtsCircleExpr circle(double radius, ServerExpression center) {
190190
return circle(xs.doubleVal(radius), center);

marklogic-client-api/src/main/java/com/marklogic/client/impl/FnExprImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022 MarkLogic Corporation
2+
* Copyright (c) 2023 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

marklogic-client-api/src/main/java/com/marklogic/client/impl/GeoExprImpl.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022 MarkLogic Corporation
2+
* Copyright (c) 2023 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -686,6 +686,15 @@ public ServerExpression geohashPrecisionDimensions(ServerExpression precision) {
686686
}
687687

688688

689+
@Override
690+
public ServerExpression geohashSubhashes(ServerExpression hash) {
691+
if (hash == null) {
692+
throw new IllegalArgumentException("hash parameter for geohashSubhashes() cannot be null");
693+
}
694+
return new XsExprImpl.StringSeqCallImpl("geo", "geohash-subhashes", new Object[]{ hash });
695+
}
696+
697+
689698
@Override
690699
public ServerExpression geohashSubhashes(ServerExpression hash, String which) {
691700
return geohashSubhashes(hash, (which == null) ? (ServerExpression) null : xs.string(which));

marklogic-client-api/src/main/java/com/marklogic/client/impl/JsonExprImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022 MarkLogic Corporation
2+
* Copyright (c) 2023 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

marklogic-client-api/src/main/java/com/marklogic/client/impl/MapExprImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022 MarkLogic Corporation
2+
* Copyright (c) 2023 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

marklogic-client-api/src/main/java/com/marklogic/client/impl/MathExprImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022 MarkLogic Corporation
2+
* Copyright (c) 2023 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

marklogic-client-api/src/main/java/com/marklogic/client/impl/PlanBuilderImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022 MarkLogic Corporation
2+
* Copyright (c) 2023 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

marklogic-client-api/src/main/java/com/marklogic/client/impl/RdfExprImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022 MarkLogic Corporation
2+
* Copyright (c) 2023 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

marklogic-client-api/src/main/java/com/marklogic/client/impl/SemExprImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022 MarkLogic Corporation
2+
* Copyright (c) 2023 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

marklogic-client-api/src/main/java/com/marklogic/client/impl/SpellExprImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022 MarkLogic Corporation
2+
* Copyright (c) 2023 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

marklogic-client-api/src/main/java/com/marklogic/client/impl/SqlExprImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022 MarkLogic Corporation
2+
* Copyright (c) 2023 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

marklogic-client-api/src/main/java/com/marklogic/client/impl/XdmpExprImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022 MarkLogic Corporation
2+
* Copyright (c) 2023 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

marklogic-client-api/src/main/java/com/marklogic/client/impl/XsExprImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022 MarkLogic Corporation
2+
* Copyright (c) 2023 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)