Skip to content

Commit 6bb71fd

Browse files
llingllinggit
authored andcommitted
#1329 change type of plan to PreparePlan
1 parent 17946a7 commit 6bb71fd

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ public <T> T explainAs(Plan plan, Class<T> as) {
256256
}
257257

258258
@Override
259-
public <T extends XMLReadHandle> T generateView(Plan plan, String schema, String view, T resultsHandle) {
259+
public <T extends XMLReadHandle> T generateView(PlanBuilder.PreparePlan plan, String schema, String view, T resultsHandle) {
260260
if (resultsHandle == null) {
261261
throw new IllegalArgumentException("Must specify a handle to generate a view for the plan");
262262
} else if (schema == null || schema.length() == 0) {
@@ -276,7 +276,7 @@ public <T extends XMLReadHandle> T generateView(Plan plan, String schema, String
276276
return services.postResource(requestLogger, "rows", null, params, astHandle, resultsHandle);
277277
}
278278
@Override
279-
public <T> T generateViewAs(Plan plan, String schema, String view, Class<T> as) {
279+
public <T> T generateViewAs(PlanBuilder.PreparePlan plan, String schema, String view, Class<T> as) {
280280
ContentHandle<T> handle = handleFor(as);
281281
if (generateView(plan, schema, view, (XMLReadHandle) handle) == null) {
282282
return null;
@@ -286,7 +286,7 @@ public <T> T generateViewAs(Plan plan, String schema, String view, Class<T> as)
286286
}
287287

288288
@Override
289-
public <T extends JSONReadHandle> T columnInfo(Plan plan, T resultsHandle) {
289+
public <T extends JSONReadHandle> T columnInfo(PlanBuilder.PreparePlan plan, T resultsHandle) {
290290
if (resultsHandle == null) {
291291
throw new IllegalArgumentException("Must specify a handle to generate a view for the plan");
292292
}
@@ -300,7 +300,7 @@ public <T extends JSONReadHandle> T columnInfo(Plan plan, T resultsHandle) {
300300
return services.postResource(requestLogger, "rows", null, params, astHandle, resultsHandle);
301301
}
302302
@Override
303-
public <T> T columnInfoAs(Plan plan, Class<T> as) {
303+
public <T> T columnInfoAs(PlanBuilder.PreparePlan plan, Class<T> as) {
304304
ContentHandle<T> handle = handleFor(as);
305305
if (!(handle instanceof JSONReadHandle))
306306
throw new IllegalArgumentException("The handle is not an instance of JSONReadHandle.");

marklogic-client-api/src/main/java/com/marklogic/client/row/RowManager.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ public enum RowStructure{ARRAY, OBJECT}
273273
* @param <T> the type of the handle for the generated view
274274
* @return the handle with the content of the generated view for the plan
275275
*/
276-
<T extends XMLReadHandle> T generateView(Plan plan, String schema, String view, T handle);
276+
<T extends XMLReadHandle> T generateView(PlanBuilder.PreparePlan plan, String schema, String view, T handle);
277277
/**
278278
* Generates generates a view that encapsulates a plan.
279279
*
@@ -294,7 +294,7 @@ public enum RowStructure{ARRAY, OBJECT}
294294
* @param <T> the type of the IO object for reading the generated view
295295
* @return an object of the IO class with the content of the generated view for the plan
296296
*/
297-
<T> T generateViewAs(Plan plan, String schema, String view, Class<T> as);
297+
<T> T generateViewAs(PlanBuilder.PreparePlan plan, String schema, String view, Class<T> as);
298298

299299
/**
300300
* This function can be used to inspect the state of a plan before execution. It returns the information about each
@@ -306,7 +306,7 @@ public enum RowStructure{ARRAY, OBJECT}
306306
* @param <T> the type of the handle for the column information
307307
* @return the handle with the content of the column information for the plan
308308
*/
309-
<T extends JSONReadHandle> T columnInfo(Plan plan, T handle);
309+
<T extends JSONReadHandle> T columnInfo(PlanBuilder.PreparePlan plan, T handle);
310310
/**This function can be used to inspect the state of a plan before execution. It returns the information about each
311311
* column in the plan, including schema name, view name, column name, data type and nullability. It also returns the
312312
* information about system columns.Generates generates a view that encapsulates a plan.
@@ -322,5 +322,5 @@ public enum RowStructure{ARRAY, OBJECT}
322322
* @param <T> the type of the IO object for reading the column information
323323
* @return an object of the IO class with the content of the column information for the plan
324324
*/
325-
<T> T columnInfoAs(Plan plan, Class<T> as);
325+
<T> T columnInfoAs(PlanBuilder.PreparePlan plan, Class<T> as);
326326
}

marklogic-client-api/src/test/java/com/marklogic/client/test/RowManagerTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1218,7 +1218,7 @@ public void testColumnInfo() throws IOException {
12181218

12191219
PlanBuilder p = rowMgr.newPlanBuilder();
12201220

1221-
PlanBuilder.ExportablePlan builtPlan =
1221+
PlanBuilder.PreparePlan builtPlan =
12221222
p.fromView("opticUnitTest", "musician")
12231223
.where(
12241224
p.cts.andQuery(
@@ -1241,7 +1241,7 @@ public void testGenerateView() throws IOException {
12411241

12421242
PlanBuilder p = rowMgr.newPlanBuilder();
12431243

1244-
PlanBuilder.ExportablePlan builtPlan =
1244+
PlanBuilder.PreparePlan builtPlan =
12451245
p.fromView("opticUnitTest", "musician")
12461246
.where(
12471247
p.cts.andQuery(

0 commit comments

Comments
 (0)