Tripal
|
Public Member Functions | |
__construct (string $schema_name='', $database='default', ?\Psr\Log\LoggerInterface $logger=NULL) | |
getTripalDbxClass ($class) | |
findVersion (?string $schema_name=NULL, bool $exact_version=FALSE) | |
getAvailableInstances () | |
![]() | |
__construct (string $schema_name='', $database='default', ?\Drupal\tripal\Services\TripalLogger $logger=NULL) | |
getDatabaseName () | |
getDatabaseKey () | |
getMessageLogger () | |
setMessageLogger (\Drupal\tripal\Services\TripalLogger $logger) | |
schema () | |
setSchemaName (string $schema_name) | |
getSchemaName () | |
getQuotedSchemaName () | |
getExtraSchemas () | |
clearExtraSchemas () | |
addExtraSchema (string $schema_name) | |
setExtraSchema (string $schema_name, int $index=2) | |
getVersion () | |
useTripalDbxSchemaFor ($object_or_class) | |
useDrupalSchemaFor ($object_or_class) | |
shouldUseTripalDbxSchema () | |
prefixTables ($sql) | |
tablePrefix ( $table='default', bool $use_tdbx_schema=FALSE) | |
getPrefix () | |
executeSqlQueries (string $sql_queries, $search_path_mode=FALSE, ?string $schema_name=NULL) | |
executeSqlFile (string $sql_file_path, $search_path_mode=FALSE, ?string $schema_name=NULL) | |
escapeTable ($table) | |
getListClassesUsingTripalDbx () | |
__toString () | |
Static Public Member Functions | |
static | removeAllTestSchemas () |
Public Attributes | |
const | EMPTY_CHADO_SIZE = 8388608 |
const | DEFAULT_VERSION = '1.3' |
Additional Inherited Members | |
![]() | |
getDefaultSchemaName (?string $schema_name=NULL, string $error_message='') | |
![]() | |
static | openNewPdoConnection (\Drupal\Core\Database\Connection $database) |
![]() | |
$identifierQuotes | |
$database = NULL | |
$databaseName = '' | |
$dbKey = '' | |
$usedSchemas = [] | |
$version = NULL | |
$messageLogger = NULL | |
$tripalDbxApi = NULL | |
$objectsUsingTripalDbx = [] | |
$classesUsingTripalDbx = [] | |
Provides an API for Chado schema.
Provides an application programming interface (API) for describing Chado schema and tables. It provides both static and instance methods. Static methods are designed to work regardless any specific Chado schema while instance methods work on a given Chado schema instance specified when the ChadoSchema object is instantiated. Default schema used for instances is 'chado'.
If you need the Drupal-style array definition for any table, use the following:
where the variable $table_name contains the name of the table you want to retireve. The getTableDef method determines the appropriate version of Chado but it can be forced through the $parameters array. See \Drupal\tripal_chado\Database\ChadoSchema::getTableDef for details.
Additionally, here are some other examples of how to use this class:
Drupal\tripal_chado\Database\ChadoConnection::__construct | ( | string | $schema_name = '' , |
$database = 'default' , |
|||
?\Psr\Log\LoggerInterface | $logger = NULL |
||
) |
{}
Drupal\tripal_chado\Database\ChadoConnection::findVersion | ( | ?string | $schema_name = NULL , |
bool | $exact_version = FALSE |
||
) |
Returns the version number of the given Chado schema.
For recent Chado instances, version is stored in the schema while version number has to be guessed in older versions (using specific table presence).
?string | $schema_name A schema name or NULL to work on current schema. | |
bool | $exact_version | Returns the most precise version available. Default: FALSE. |
Reimplemented from Drupal\tripal\TripalDBX\TripalDbxConnection.
Drupal\tripal_chado\Database\ChadoConnection::getAvailableInstances | ( | ) |
Get the list of available Chado instances in current database.
This function returns both Chado schema integrated with Tripal and free Chado schemas.
Reimplemented from Drupal\tripal\TripalDBX\TripalDbxConnection.
Drupal\tripal_chado\Database\ChadoConnection::getTripalDbxClass | ( | $class | ) |
{Gets the Tripal DBX-specific class for the specified category.Returns the Tripal DBX-specific override class if any for the specified class category.
string | $class | The class category for which we want the specific class. |
Reimplemented from Drupal\tripal\TripalDBX\TripalDbxConnection.
|
static |
Removes all existing Chado test schemas.
Use this function when tests schemas were not removed properly by the automated test system.
Usage: \Drupal\tripal_chado\Database\ChadoConnection::removeAllTestSchemas();
const Drupal\tripal_chado\Database\ChadoConnection::DEFAULT_VERSION = '1.3' |
Default Chado schema version.
const Drupal\tripal_chado\Database\ChadoConnection::EMPTY_CHADO_SIZE = 8388608 |
Reserved schema name of the Chado schema used for testing.