# OracleLabsParallelGraphAnalyticsPgxRestApi.PGQLApi

All URIs are relative to */*

Method | HTTP request | Description
------------- | ------------- | -------------
[**cloneAndExecutePgqlWithPost**](PGQLApi.md#cloneAndExecutePgqlWithPost) | **POST** /core/v1/pgql/cloneAndExecute | Run a PGQL query on a clone of the graph
[**destroyPreparedStatement**](PGQLApi.md#destroyPreparedStatement) | **DELETE** /core/v1/pgql/preparedStatements/x-ps-id | Delete a pattern matching result set that is bound to a session.
[**destroyResult**](PGQLApi.md#destroyResult) | **DELETE** /core/v1/pgql/queryResults/x-result-set-id | Delete a pattern matching result set that is bound to a session
[**executeAnyPreparedStatement**](PGQLApi.md#executeAnyPreparedStatement) | **POST** /core/v1/pgql/preparedStatements/x-ps-id/executeAny | Submit a pattern matching or graph altering query
[**executePgqlWithPost**](PGQLApi.md#executePgqlWithPost) | **POST** /core/v1/pgql/execute | Run a PGQL query
[**executePreparedStatement**](PGQLApi.md#executePreparedStatement) | **POST** /core/v1/pgql/preparedStatements/x-ps-id/execute | Submit a pattern matching query
[**explainPgqlWithPost**](PGQLApi.md#explainPgqlWithPost) | **POST** /core/v1/pgql/explain | Explain the execution plan of a PGQL query
[**preparePgql**](PGQLApi.md#preparePgql) | **POST** /core/v1/pgql/prepare | Prepare a pattern matching query
[**queryPgqlWithPost**](PGQLApi.md#queryPgqlWithPost) | **POST** /core/v1/pgql/run | Run a PGQL query

<a name="cloneAndExecutePgqlWithPost"></a>
# **cloneAndExecutePgqlWithPost**
> Graph cloneAndExecutePgqlWithPost(body, SID)

Run a PGQL query on a clone of the graph

### Example
```javascript
import {OracleLabsParallelGraphAnalyticsPgxRestApi} from 'oracle_labs_parallel_graph_analytics__pgx_rest_api';

let apiInstance = new OracleLabsParallelGraphAnalyticsPgxRestApi.PGQLApi();
let body = new OracleLabsParallelGraphAnalyticsPgxRestApi.PgqlCloneAndExecuteRequest(); // PgqlCloneAndExecuteRequest | The request containing query, new graph name and semantic
let SID = "SID_example"; // String | session ID

apiInstance.cloneAndExecutePgqlWithPost(body, SID, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**PgqlCloneAndExecuteRequest**](PgqlCloneAndExecuteRequest.md)| The request containing query, new graph name and semantic | 
 **SID** | **String**| session ID | 

### Return type

[**Graph**](Graph.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

<a name="destroyPreparedStatement"></a>
# **destroyPreparedStatement**
> destroyPreparedStatement(SID, xPsId)

Delete a pattern matching result set that is bound to a session.

### Example
```javascript
import {OracleLabsParallelGraphAnalyticsPgxRestApi} from 'oracle_labs_parallel_graph_analytics__pgx_rest_api';

let apiInstance = new OracleLabsParallelGraphAnalyticsPgxRestApi.PGQLApi();
let SID = "SID_example"; // String | session ID
let xPsId = "xPsId_example"; // String | prepared statement id

apiInstance.destroyPreparedStatement(SID, xPsId, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **SID** | **String**| session ID | 
 **xPsId** | **String**| prepared statement id | 

### Return type

null (empty response body)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: Not defined

<a name="destroyResult"></a>
# **destroyResult**
> destroyResult(SID, xResultSetId, opts)

Delete a pattern matching result set that is bound to a session

### Example
```javascript
import {OracleLabsParallelGraphAnalyticsPgxRestApi} from 'oracle_labs_parallel_graph_analytics__pgx_rest_api';

let apiInstance = new OracleLabsParallelGraphAnalyticsPgxRestApi.PGQLApi();
let SID = "SID_example"; // String | session ID
let xResultSetId = "xResultSetId_example"; // String | Result set Id
let opts = { 
  'csrfToken': "csrfToken_example" // String | CSRF token
};
apiInstance.destroyResult(SID, xResultSetId, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **SID** | **String**| session ID | 
 **xResultSetId** | **String**| Result set Id | 
 **csrfToken** | **String**| CSRF token | [optional] 

### Return type

null (empty response body)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: Not defined

<a name="executeAnyPreparedStatement"></a>
# **executeAnyPreparedStatement**
> PgqlResultProxyResponse executeAnyPreparedStatement(body, SID, xPsId)

Submit a pattern matching or graph altering query

### Example
```javascript
import {OracleLabsParallelGraphAnalyticsPgxRestApi} from 'oracle_labs_parallel_graph_analytics__pgx_rest_api';

let apiInstance = new OracleLabsParallelGraphAnalyticsPgxRestApi.PGQLApi();
let body = new OracleLabsParallelGraphAnalyticsPgxRestApi.ExecutePreparedStatementRequest(); // ExecutePreparedStatementRequest | The PGQL execute prepared statement request containing the bind values
let SID = "SID_example"; // String | session ID
let xPsId = "xPsId_example"; // String | prepared statement id

apiInstance.executeAnyPreparedStatement(body, SID, xPsId, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**ExecutePreparedStatementRequest**](ExecutePreparedStatementRequest.md)| The PGQL execute prepared statement request containing the bind values | 
 **SID** | **String**| session ID | 
 **xPsId** | **String**| prepared statement id | 

### Return type

[**PgqlResultProxyResponse**](PgqlResultProxyResponse.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

<a name="executePgqlWithPost"></a>
# **executePgqlWithPost**
> PgqlResultProxyResponse executePgqlWithPost(body, SID)

Run a PGQL query

### Example
```javascript
import {OracleLabsParallelGraphAnalyticsPgxRestApi} from 'oracle_labs_parallel_graph_analytics__pgx_rest_api';

let apiInstance = new OracleLabsParallelGraphAnalyticsPgxRestApi.PGQLApi();
let body = new OracleLabsParallelGraphAnalyticsPgxRestApi.PgqlQueryRequest(); // PgqlQueryRequest | The PGQL query request containing query and semantic
let SID = "SID_example"; // String | session ID

apiInstance.executePgqlWithPost(body, SID, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**PgqlQueryRequest**](PgqlQueryRequest.md)| The PGQL query request containing query and semantic | 
 **SID** | **String**| session ID | 

### Return type

[**PgqlResultProxyResponse**](PgqlResultProxyResponse.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

<a name="executePreparedStatement"></a>
# **executePreparedStatement**
> PgqlResultProxyResponse executePreparedStatement(body, SID, xPsId)

Submit a pattern matching query

### Example
```javascript
import {OracleLabsParallelGraphAnalyticsPgxRestApi} from 'oracle_labs_parallel_graph_analytics__pgx_rest_api';

let apiInstance = new OracleLabsParallelGraphAnalyticsPgxRestApi.PGQLApi();
let body = new OracleLabsParallelGraphAnalyticsPgxRestApi.ExecutePreparedStatementRequest(); // ExecutePreparedStatementRequest | The PGQL execute prepared statement request containing the bind values
let SID = "SID_example"; // String | session ID
let xPsId = "xPsId_example"; // String | prepared statement id

apiInstance.executePreparedStatement(body, SID, xPsId, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**ExecutePreparedStatementRequest**](ExecutePreparedStatementRequest.md)| The PGQL execute prepared statement request containing the bind values | 
 **SID** | **String**| session ID | 
 **xPsId** | **String**| prepared statement id | 

### Return type

[**PgqlResultProxyResponse**](PgqlResultProxyResponse.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

<a name="explainPgqlWithPost"></a>
# **explainPgqlWithPost**
> Operation explainPgqlWithPost(body, SID)

Explain the execution plan of a PGQL query

### Example
```javascript
import {OracleLabsParallelGraphAnalyticsPgxRestApi} from 'oracle_labs_parallel_graph_analytics__pgx_rest_api';

let apiInstance = new OracleLabsParallelGraphAnalyticsPgxRestApi.PGQLApi();
let body = new OracleLabsParallelGraphAnalyticsPgxRestApi.PgqlExplainRequest(); // PgqlExplainRequest | The PGQL explain request containing the query
let SID = "SID_example"; // String | session ID

apiInstance.explainPgqlWithPost(body, SID, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**PgqlExplainRequest**](PgqlExplainRequest.md)| The PGQL explain request containing the query | 
 **SID** | **String**| session ID | 

### Return type

[**Operation**](Operation.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

<a name="preparePgql"></a>
# **preparePgql**
> PreparedStatementResponse preparePgql(body, SID)

Prepare a pattern matching query

Prepare a pattern matching query (from a PgxSession, where the FROM clause specifies the graph) or from an explicit PgxGraph

### Example
```javascript
import {OracleLabsParallelGraphAnalyticsPgxRestApi} from 'oracle_labs_parallel_graph_analytics__pgx_rest_api';

let apiInstance = new OracleLabsParallelGraphAnalyticsPgxRestApi.PGQLApi();
let body = new OracleLabsParallelGraphAnalyticsPgxRestApi.PrepareStatementRequest(); // PrepareStatementRequest | The PGQL prepare statement request containing the query
let SID = "SID_example"; // String | session ID

apiInstance.preparePgql(body, SID, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**PrepareStatementRequest**](PrepareStatementRequest.md)| The PGQL prepare statement request containing the query | 
 **SID** | **String**| session ID | 

### Return type

[**PreparedStatementResponse**](PreparedStatementResponse.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

<a name="queryPgqlWithPost"></a>
# **queryPgqlWithPost**
> PgqlResultProxyResponse queryPgqlWithPost(body, SID)

Run a PGQL query

### Example
```javascript
import {OracleLabsParallelGraphAnalyticsPgxRestApi} from 'oracle_labs_parallel_graph_analytics__pgx_rest_api';

let apiInstance = new OracleLabsParallelGraphAnalyticsPgxRestApi.PGQLApi();
let body = new OracleLabsParallelGraphAnalyticsPgxRestApi.PgqlQueryRequest(); // PgqlQueryRequest | The PGQL query request containing query and semantic
let SID = "SID_example"; // String | session ID

apiInstance.queryPgqlWithPost(body, SID, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**PgqlQueryRequest**](PgqlQueryRequest.md)| The PGQL query request containing query and semantic | 
 **SID** | **String**| session ID | 

### Return type

[**PgqlResultProxyResponse**](PgqlResultProxyResponse.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

