Open Data Catalog v2.0.0
Drupal\datastore\SqlEndpoint\Service Class Reference
Inheritance diagram for Drupal\datastore\SqlEndpoint\Service:

Public Member Functions

 __construct (DatastoreService $datastoreService, ConfigFactory $configFactory)
 
 runQuery (string $queryString, $showDbColumns=FALSE)
 
 getResourceIdentifierAndVersion (string $sqlString)
 
 getResourceUuid (string $sqlString)
 

Static Public Member Functions

static create (ContainerInterface $container)
 

Detailed Description

Class Service.

Definition at line 20 of file Service.php.

Constructor & Destructor Documentation

◆ __construct()

Drupal\datastore\SqlEndpoint\Service::__construct ( DatastoreService  $datastoreService,
ConfigFactory  $configFactory 
)

Constructor, sets the datastoreService and configFactory properties.

Parameters
Drupal\datastore\Service$datastoreServiceThe datastore service object.
Drupal\Core\Config\ConfigFactory$configFactoryAn instance of Drupal's configFactory.

Definition at line 53 of file Service.php.

Member Function Documentation

◆ create()

static Drupal\datastore\SqlEndpoint\Service::create ( ContainerInterface  $container)
static

{}

Definition at line 38 of file Service.php.

◆ getResourceIdentifierAndVersion()

Drupal\datastore\SqlEndpoint\Service::getResourceIdentifierAndVersion ( string  $sqlString)

Get resource UUID.

Parameters
string$sqlStringA string with an sql statement.
Returns
array An array with the identifier and version.
Exceptions

Definition at line 117 of file Service.php.

◆ getResourceUuid()

Drupal\datastore\SqlEndpoint\Service::getResourceUuid ( string  $sqlString)

Get the a resource's UUID if it was given through the SQL string.

Definition at line 291 of file Service.php.

◆ runQuery()

Drupal\datastore\SqlEndpoint\Service::runQuery ( string  $queryString,
  $showDbColumns = FALSE 
)

Run query.

Parameters
string$queryStringThe query string passed to the endpoint.
bool$showDbColumnsIf true, return DB column machine names instead of human-readable descriptions, and include a "record_number" column.
Returns
array Array of row/record objects.

Definition at line 71 of file Service.php.