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.

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)


Definition at line 38 of file Service.php.

◆ getResourceIdentifierAndVersion()

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

Get resource UUID.

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

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.

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.
array Array of row/record objects.

Definition at line 71 of file Service.php.