Skip to content

Latest commit

 

History

History
100 lines (64 loc) · 3.43 KB

ActiveQueryBuilderApi.md

File metadata and controls

100 lines (64 loc) · 3.43 KB

WebApiActiveQueryBuilder\ActiveQueryBuilderApi

All URIs are relative to https://webapi.activequerybuilder.com

Method HTTP request Description
getQueryColumnsPost POST /getQueryColumns
transformSQLPost POST /transformSQL

getQueryColumnsPost

\WebApiActiveQueryBuilder\QueryColumn[] getQueryColumnsPost($query)

Returns list of columns for the given SQL query.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new WebApiActiveQueryBuilder\Api\ActiveQueryBuilderApi();
$query = new \WebApiActiveQueryBuilder\SqlQuery(); // \WebApiActiveQueryBuilder\SqlQuery | Information about SQL query and it's context.

try {
    $result = $api_instance->getQueryColumnsPost($query);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ActiveQueryBuilderApi->getQueryColumnsPost: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
query \WebApiActiveQueryBuilder\SqlQuery Information about SQL query and it's context.

Return type

\WebApiActiveQueryBuilder\QueryColumn[]

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json, text/xml
  • Accept: application/json, text/html

[Back to top] [Back to API list] [Back to Model list] [Back to README]

transformSQLPost

\WebApiActiveQueryBuilder\TransformResult transformSQLPost($transform)

Transforms the given SQL query according to the commands provided in this request. You can add constraints, hide some of the resultset columns, chang sorting or limit rows of resultset. All transformations can only lead to reorganization or limitation of the resultset data. This means that it's impossible to get transformed SQL that reveals any other data than the data retutned by original query.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new WebApiActiveQueryBuilder\Api\ActiveQueryBuilderApi();
$transform = new \WebApiActiveQueryBuilder\Transform(); // \WebApiActiveQueryBuilder\Transform | SQL transformation parameters and commands.

try {
    $result = $api_instance->transformSQLPost($transform);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ActiveQueryBuilderApi->transformSQLPost: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
transform \WebApiActiveQueryBuilder\Transform SQL transformation parameters and commands.

Return type

\WebApiActiveQueryBuilder\TransformResult

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json, text/xml
  • Accept: application/json, text/html

[Back to top] [Back to API list] [Back to Model list] [Back to README]