Tripal
Public Member Functions | List of all members
Drupal\tripal_chado\Services\ChadoCustomTableManager Class Reference
Inheritance diagram for Drupal\tripal_chado\Services\ChadoCustomTableManager:
Inheritance graph
[legend]

Public Member Functions

 __construct ()
 
 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)
 

Constructor & Destructor Documentation

◆ __construct()

Drupal\tripal_chado\Services\ChadoCustomTableManager::__construct ( )

Instantiates a new ChadoCustomTableManager object.

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 associatve 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.


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