GPUdb C++ API  Version 7.0.19.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
gpudb::QueryGraphRequest Struct Reference

A set of input parameters for const. More...

#include <gpudb/protocol/query_graph.h>

Public Member Functions

 QueryGraphRequest ()
 Constructs a QueryGraphRequest object with default parameter values. More...
 
 QueryGraphRequest (const std::string &graphName_, const std::vector< std::string > &queries_, const std::vector< std::string > &restrictions_, const std::string &adjacencyTable_, const int32_t rings_, const std::map< std::string, std::string > &options_)
 Constructs a QueryGraphRequest object with the specified parameters. More...
 

Public Attributes

std::string graphName
 
std::vector< std::string > queries
 
std::vector< std::string > restrictions
 
std::string adjacencyTable
 
int32_t rings
 
std::map< std::string,
std::string > 
options
 

Detailed Description

A set of input parameters for const.

Employs a topological query on a network graph generated a-priori by const and returns a list of adjacent edge(s) or node(s), also known as an adjacency list, depending on what's been provided to the endpoint; providing edges will return nodes and providing nodes will return edges.

To determine the node(s) or edge(s) adjacent to a value from a given column, provide a list of values to queries. This field can be populated with column values from any table as long as the type is supported by the given identifier. See Query Identifiers for more information.

To return the adjacency list in the response, leave adjacencyTable empty. To return the adjacency list in a table and not in the response, provide a value to adjacencyTable and set export_query_results to false. To return the adjacency list both in a table and the response, provide a value to adjacencyTable and set export_query_results to true.

IMPORTANT: It's highly recommended that you review the Network Graphs & Solvers concepts documentation, the Graph REST Tutorial, and/or some /query/graph examples before using this endpoint.

Definition at line 44 of file query_graph.h.

Constructor & Destructor Documentation

gpudb::QueryGraphRequest::QueryGraphRequest ( )
inline

Constructs a QueryGraphRequest object with default parameter values.

Definition at line 50 of file query_graph.h.

gpudb::QueryGraphRequest::QueryGraphRequest ( const std::string &  graphName_,
const std::vector< std::string > &  queries_,
const std::vector< std::string > &  restrictions_,
const std::string &  adjacencyTable_,
const int32_t  rings_,
const std::map< std::string, std::string > &  options_ 
)
inline

Constructs a QueryGraphRequest object with the specified parameters.

Parameters
[in]graphName_Name of the graph resource to query.
[in]queries_Nodes or edges to be queried specified using query identifiers. Identifiers can be used with existing column names, e.g., 'table.column AS QUERY_NODE_ID', raw values, e.g., '{0, 2} AS QUERY_NODE_ID', or expressions, e.g., 'ST_MAKEPOINT(table.x, table.y) AS QUERY_NODE_WKTPOINT'. Multiple values can be provided as long as the same identifier is used for all values. If using raw values in an identifier combination, the number of values specified must match across the combination.
[in]restrictions_Additional restrictions to apply to the nodes/edges of an existing graph. Restrictions must be specified using identifiers; identifiers are grouped as combinations. Identifiers can be used with existing column names, e.g., 'table.column AS RESTRICTIONS_EDGE_ID', expressions, e.g., 'column/2 AS RESTRICTIONS_VALUECOMPARED', or raw values, e.g., '{0, 0, 0, 1} AS RESTRICTIONS_ONOFFCOMPARED'. If using raw values in an identifier combination, the number of values specified must match across the combination.
[in]adjacencyTable_Name of the table to store the resulting adjacencies. If left blank, the query results are instead returned in the response even if export_query_results is set to false. If the 'QUERY_TARGET_NODE_LABEL' query identifier is used in queries, then two additional columns will be available: 'PATH_ID' and 'RING_ID'. See Using Labels for more information.
[in]rings_Sets the number of rings around the node to query for adjacency, with '1' being the edges directly attached to the queried node. Also known as number of hops. For example, if it is set to '2', the edge(s) directly attached to the queried node(s) will be returned; in addition, the edge(s) attached to the node(s) attached to the initial ring of edge(s) surrounding the queried node(s) will be returned. If the value is set to '0', any nodes that meet the criteria in queries and restrictions will be returned. This parameter is only applicable when querying nodes.
[in]options_Additional parameters

Definition at line 205 of file query_graph.h.

Member Data Documentation

std::string gpudb::QueryGraphRequest::adjacencyTable

Definition at line 218 of file query_graph.h.

std::string gpudb::QueryGraphRequest::graphName

Definition at line 215 of file query_graph.h.

std::map<std::string, std::string> gpudb::QueryGraphRequest::options

Definition at line 220 of file query_graph.h.

std::vector<std::string> gpudb::QueryGraphRequest::queries

Definition at line 216 of file query_graph.h.

std::vector<std::string> gpudb::QueryGraphRequest::restrictions

Definition at line 217 of file query_graph.h.

int32_t gpudb::QueryGraphRequest::rings

Definition at line 219 of file query_graph.h.


The documentation for this struct was generated from the following file: