Tripal
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
Drupal\tripal_chado\Services\ChadoCustomTableManager Class Reference
Inheritance diagram for Drupal\tripal_chado\Services\ChadoCustomTableManager:
Inheritance graph
[legend]
Collaboration diagram for Drupal\tripal_chado\Services\ChadoCustomTableManager:
Collaboration graph
[legend]

Public Member Functions

 __construct (Connection $connection, ChadoConnection $chado_connection)
 
 create (string $table_name, string $chado_schema=NULL)
 
 loadById (int $id)
 
 loadbyName (string $table_name, string $chado_schema=NULL)
 
 findByName (string $table_name, string $chado_schema=NULL)
 
 getTables (string $chado_schema=NULL)
 

Public Attributes

Connection $connection
 
ChadoConnection $chado_connection
 

Constructor & Destructor Documentation

◆ __construct()

Drupal\tripal_chado\Services\ChadoCustomTableManager::__construct ( Connection  $connection,
ChadoConnection  $chado_connection 
)

Instantiates a new ChadoCustomTableManager object.

Parameters

Drupal\Core\Database\Connection The database connection object.

Parameters
Drupal

tripal_chado\Database\ChadoConnection The chado connection used to query chado.

Reimplemented in Drupal\tripal_chado\Services\ChadoMviewsManager.

Member Function Documentation

◆ create()

Drupal\tripal_chado\Services\ChadoCustomTableManager::create ( string  $table_name,
string  $chado_schema = NULL 
)

Creates a new ChadoCustomTable object.

This object will work with the custom table in the default Chado schema. Be sure to call the setSchemaName() on the ChadoConnection object to ensure the custom table is managed in the correct Chado instance.

Parameters
string$table_nameThe name of the custom table.
string$chado_schemaOptional. The chado schema where the custom table will live. If no schema is specified then the default schema is used.
Returns
\Drupal\tripal_chado\ChadoCustomTables\ChadoCustomTable

Reimplemented in Drupal\tripal_chado\Services\ChadoMviewsManager.

◆ findByName()

Drupal\tripal_chado\Services\ChadoCustomTableManager::findByName ( string  $table_name,
string  $chado_schema = NULL 
)

Finds the Id of the custom table that matches the name and Chado schema.

Parameters
string$table_nameThe name of the table to find the ID for.
string$chado_schemaOptional. The chado schema from which to find a custom tables. If no schema is specified then the default schema is used.
Returns
int The id of the matching custom table.

Reimplemented in Drupal\tripal_chado\Services\ChadoMviewsManager.

◆ getTables()

Drupal\tripal_chado\Services\ChadoCustomTableManager::getTables ( string  $chado_schema = NULL)

Retrieve a list of all Chado custom table names.

Parameters
string$chado_schemaOptional. The chado schema from which to retrieve custom tables. If no schema is specified then the default schema is used.
Returns
array An associative array of custom tables with the key being the id and the value the table name.

Reimplemented in Drupal\tripal_chado\Services\ChadoMviewsManager.

◆ loadById()

Drupal\tripal_chado\Services\ChadoCustomTableManager::loadById ( int  $id)

Loads a custom table whose table Id matches the one provided.

Parameters
int$idThe ID of the custom table.
Returns
\Drupal\tripal_chado\ChadoCustomTables\ChadoCustomTable A ChadoCustomTable object or NULL if not found.

Reimplemented in Drupal\tripal_chado\Services\ChadoMviewsManager.

◆ loadbyName()

Drupal\tripal_chado\Services\ChadoCustomTableManager::loadbyName ( string  $table_name,
string  $chado_schema = NULL 
)

Loads a custom table that matches the given name and Chado schema.

Parameters
string$table_nameThe name of the table to find the ID for.
string$chado_schemaOptional. The chado schema from which to find a custom tables. If no schema is specified then the default schema is used.
Returns
\Drupal\tripal_chado\ChadoCustomTables\ChadoCustomTable A ChadoCustomTable object or NULL if not found.

Reimplemented in Drupal\tripal_chado\Services\ChadoMviewsManager.

Member Data Documentation

◆ $chado_connection

ChadoConnection Drupal\tripal_chado\Services\ChadoCustomTableManager::$chado_connection

The chado connection used to query chado.

◆ $connection

Connection Drupal\tripal_chado\Services\ChadoCustomTableManager::$connection

The Drupal database connection.


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