public interface RowManager
Modifier and Type | Interface and Description |
---|---|
static class |
RowManager.RowSetPart
Distinguishes between the header and rows that constitute a row set.
|
static class |
RowManager.RowStructure
Distinguishes between rows in an object structure or array structure.
|
Modifier and Type | Method and Description |
---|---|
<T extends JSONReadHandle> |
columnInfo(PlanBuilder.PreparePlan plan,
T handle)
This function can be used to inspect the state of a plan before execution.
|
<T> T |
columnInfoAs(PlanBuilder.PreparePlan plan,
java.lang.Class<T> as)
This function can be used to inspect the state of a plan before execution.
|
<T extends StructureReadHandle> |
explain(PlanBuilder.Plan plan,
T handle)
Constructs a plan for retrieving a set of database rows and returns a handle
for the explanation of the plan as a JSON or XML structure.
|
<T> T |
explainAs(PlanBuilder.Plan plan,
java.lang.Class<T> as)
Constructs a plan for retrieving a set of database rows and returns an explanation
of the plan in the representation specified by the IO class.
|
<T extends XMLReadHandle> |
generateView(PlanBuilder.PreparePlan plan,
java.lang.String schema,
java.lang.String view,
T handle)
Generates generates a view that encapsulates a plan.
|
<T> T |
generateViewAs(PlanBuilder.PreparePlan plan,
java.lang.String schema,
java.lang.String view,
java.lang.Class<T> as)
Generates generates a view that encapsulates a plan.
|
RowManager.RowSetPart |
getDatatypeStyle()
Returns whether data types should be emitted in each row (the default) or in the header
in the response for requests made with the row manager.
|
RowManager.RowStructure |
getRowStructureStyle()
Returns whether each row should have an array or object structure
in the response for requests made with the row manager.
|
PlanBuilder |
newPlanBuilder()
Creates a builder to define a plan for constructing and retrieving database rows.
|
RawPlanDefinition |
newRawPlanDefinition(JSONWriteHandle handle)
Defines a plan from a JSON serialization of the plan AST (Abstract Syntax Tree).
|
RawQueryDSLPlan |
newRawQueryDSLPlan(TextWriteHandle handle)
Defines a plan from a Query DSL in a JavaScript serialization.
|
RawSPARQLSelectPlan |
newRawSPARQLSelectPlan(TextWriteHandle handle)
Defines a plan from a SPARQL SELECT query.
|
RawSQLPlan |
newRawSQLPlan(TextWriteHandle handle)
Defines a plan from an SQL query.
|
<T extends StructureReadHandle> |
resultDoc(PlanBuilder.Plan plan,
T handle)
Constructs and retrieves a set of database rows based on a plan using
a handle to get the set of rows as a single JSON or XML structure.
|
<T extends StructureReadHandle> |
resultDoc(PlanBuilder.Plan plan,
T handle,
Transaction transaction)
Constructs and retrieves a set of database rows based on a plan using
a handle to get the set of rows as a single JSON or XML structure
and reflecting documents written or deleted by an uncommitted transaction.
|
<T> T |
resultDocAs(PlanBuilder.Plan plan,
java.lang.Class<T> as)
Constructs and retrieves a set of database rows based on a plan
in the representation specified by the IO class.
|
<T> T |
resultDocAs(PlanBuilder.Plan plan,
java.lang.Class<T> as,
Transaction transaction)
Constructs and retrieves a set of database rows based on a plan
in the representation specified by the IO class and reflecting
documents written or deleted by an uncommitted transaction.
|
RowSet<RowRecord> |
resultRows(PlanBuilder.Plan plan)
Constructs and retrieves a set of database rows based on a plan using
a map interface for the column values in each row.
|
<T extends StructureReadHandle> |
resultRows(PlanBuilder.Plan plan,
T rowHandle)
Constructs and retrieves a set of database rows based on a plan using
a JSON or XML handle for each row.
|
RowSet<RowRecord> |
resultRows(PlanBuilder.Plan plan,
Transaction transaction)
Constructs and retrieves a set of database rows based on a plan using
a map interface and reflecting documents written or deleted by an
uncommitted transaction.
|
<T extends StructureReadHandle> |
resultRows(PlanBuilder.Plan plan,
T rowHandle,
Transaction transaction)
Constructs and retrieves a set of database rows based on a plan using
a JSON or XML handle for each row and reflecting documents written or
deleted by an uncommitted transaction.
|
<T> RowSet<T> |
resultRowsAs(PlanBuilder.Plan plan,
java.lang.Class<T> as)
Constructs and retrieves a set of database rows based on a plan using
a JSON or XML handle for each row and reflecting documents written or
deleted by an uncommitted transaction.
|
<T> RowSet<T> |
resultRowsAs(PlanBuilder.Plan plan,
java.lang.Class<T> as,
Transaction transaction)
Constructs and retrieves a set of database rows based on a plan using
a JSON or XML handle for each row and reflecting documents written or
deleted by an uncommitted transaction.
|
void |
setDatatypeStyle(RowManager.RowSetPart style)
Specifies whether to emit the data type of each column in each row or only in the header
in the response for requests made with the row manager.
|
void |
setRowStructureStyle(RowManager.RowStructure style)
Specifies whether to get each row as an object (the default) or as an array
in the response for requests made with the row manager.
|
PlanBuilder newPlanBuilder()
RowManager.RowSetPart getDatatypeStyle()
void setDatatypeStyle(RowManager.RowSetPart style)
style
- the part of the rowset that should contain data typesRowManager.RowStructure getRowStructureStyle()
void setRowStructureStyle(RowManager.RowStructure style)
style
- the structure of rows in the responseRawPlanDefinition newRawPlanDefinition(JSONWriteHandle handle)
handle
- a handle for a JSON serialization of a plan ASTRawQueryDSLPlan newRawQueryDSLPlan(TextWriteHandle handle)
handle
- a textual handle for Query DSL in JavaScript formatRawSQLPlan newRawSQLPlan(TextWriteHandle handle)
handle
- a textual handle for the SQL serializationRawSPARQLSelectPlan newRawSPARQLSelectPlan(TextWriteHandle handle)
handle
- a textual handle for the SPARQL serializationRowSet<RowRecord> resultRows(PlanBuilder.Plan plan)
plan
- the definition of a plan for the database rowsRowSet<RowRecord> resultRows(PlanBuilder.Plan plan, Transaction transaction)
plan
- the definition of a plan for the database rowstransaction
- a open transaction for documents from which rows have been projected<T extends StructureReadHandle> RowSet<T> resultRows(PlanBuilder.Plan plan, T rowHandle)
T
- the type of the row handleplan
- the definition of a plan for the database rowsrowHandle
- the JSON or XML handle that provides each row<T extends StructureReadHandle> RowSet<T> resultRows(PlanBuilder.Plan plan, T rowHandle, Transaction transaction)
T
- the type of the row handleplan
- the definition of a plan for the database rowsrowHandle
- the JSON or XML handle that provides each rowtransaction
- a open transaction for documents from which rows have been projected<T> RowSet<T> resultRowsAs(PlanBuilder.Plan plan, java.lang.Class<T> as)
ContentHandle
are registered.
Learn more about shortcut methodsT
- the type of object that will be returned by the handle registered for itplan
- the definition of a plan for the database rowsas
- the IO class for reading each row as JSON or XML content<T> RowSet<T> resultRowsAs(PlanBuilder.Plan plan, java.lang.Class<T> as, Transaction transaction)
ContentHandle
are registered.
Learn more about shortcut methodsT
- the type of object that will be returned by the handle registered for itplan
- the definition of a plan for the database rowsas
- the IO class for reading each row as JSON or XML contenttransaction
- a open transaction for documents from which rows have been projected<T extends StructureReadHandle> T resultDoc(PlanBuilder.Plan plan, T handle)
T
- the type of the row handleplan
- the definition of a plan for the database rowshandle
- the JSON or XML handle for the set of rows<T extends StructureReadHandle> T resultDoc(PlanBuilder.Plan plan, T handle, Transaction transaction)
T
- the type of the row handleplan
- the definition of a plan for the database rowshandle
- the JSON or XML handle for the set of rowstransaction
- a open transaction for documents from which rows have been projected<T> T resultDocAs(PlanBuilder.Plan plan, java.lang.Class<T> as)
ContentHandle
are registered.
Learn more about shortcut methodsT
- the type of the IO object for reading the set of rowsplan
- the definition of a plan for the database rowsas
- the IO class for reading the set of rows<T> T resultDocAs(PlanBuilder.Plan plan, java.lang.Class<T> as, Transaction transaction)
ContentHandle
are registered.
Learn more about shortcut methodsT
- the type of the IO object for reading the set of rowsplan
- the definition of a plan for the database rowsas
- the IO class for reading the set of rowstransaction
- a open transaction for documents from which rows have been projected<T extends StructureReadHandle> T explain(PlanBuilder.Plan plan, T handle)
T
- the type of the explanation handleplan
- the definition of a plan for database rowshandle
- the JSON or XML handle on the explanation for the plan<T> T explainAs(PlanBuilder.Plan plan, java.lang.Class<T> as)
ContentHandle
are registered.
Learn more about shortcut methodsT
- the type of the IO object for reading the explanationplan
- the definition of a plan for database rowsas
- the IO class for reading the explanation for the plan<T extends XMLReadHandle> T generateView(PlanBuilder.PreparePlan plan, java.lang.String schema, java.lang.String view, T handle)
PlanBuilder.fromView(String, String)
accessor to query
against the generated view.T
- the type of the handle for the generated viewplan
- the definition of a plan for database rowsschema
- the name of the schema for the new view generated from the planview
- the name of the new view generated from the planhandle
- the XML handle on the generated view for the plan<T> T generateViewAs(PlanBuilder.PreparePlan plan, java.lang.String schema, java.lang.String view, java.lang.Class<T> as)
PlanBuilder.fromView(String, String)
accessor to query
against the generated view.
The IO class must have been registered before creating the database client.
By default, the provided handles that implement
ContentHandle
are registered.
Learn more about shortcut methodsT
- the type of the IO object for reading the generated viewplan
- the definition of a plan for database rowsschema
- the name of the schema for the new view generated from the planview
- the name of the new view generated from the planas
- the IO class for reading the generated view for the plan<T extends JSONReadHandle> T columnInfo(PlanBuilder.PreparePlan plan, T handle)
T
- the type of the handle for the column informationplan
- the definition of a plan for database rowshandle
- the Json handle on the column information for the plan<T> T columnInfoAs(PlanBuilder.PreparePlan plan, java.lang.Class<T> as)
ContentHandle
are registered.
Learn more about shortcut methodsT
- the type of the IO object for reading the column informationplan
- the definition of a plan for database rowsas
- the IO class for reading the column information for the planCopyright © 2013-2021 MarkLogic Corporation.