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

Public Member Functions

 getSchemaDef (array $parameters)
 
 getMainTables ()
 
- Public Member Functions inherited from Drupal\tripal\TripalDBX\TripalDbxSchema
 __construct (\Drupal\tripal\TripalDBX\TripalDbxConnection $connection)
 
 initialize ()
 
 getSchemaName ()
 
 findTables ($table_expression)
 
 queryTableInformation ($table)
 
 indexExists ($table, $index_name, bool $exact_name=FALSE)
 
 getSchemaSize ()
 
 schemaExists ()
 
 functionExists (string $function_name, array $function_parameters)
 
 sequenceExists (?string $table_name=NULL, ?string $column_name=NULL, ?string &$sequence_name=NULL)
 
 constraintExists ( $table, $constraint_name, ?string $type=NULL)
 
 primaryKeyExists (string $table, ?string $column=NULL)
 
 foreignKeyConstraintExists (string $base_table, string $base_column)
 
 getTables (array $include=[])
 
 getTableDef (string $table, array $parameters)
 
 getTableDdl (string $table_name, bool $clear_cache=FALSE)
 
 getReferencingTables (string $table_name, bool $clear_cache=FALSE)
 
 createSchema ()
 
 cloneSchema (string $source_schema)
 
 renameSchema (string $new_schema_name)
 
 dropSchema ()
 
 tableExists ($table)
 

Additional Inherited Members

- Protected Attributes inherited from Drupal\tripal\TripalDBX\TripalDbxSchema
 $defaultSchema = ''
 
 $quotedDefaultSchema = ''
 
 $initialized = FALSE
 
 $tripalDbxApi = NULL
 

Detailed Description

Chado schema class.

Member Function Documentation

◆ getMainTables()

Drupal\tripal_chado\Database\ChadoSchema::getMainTables ( )

Returns all chado base tables.

Base tables are those that contain the primary record for a data type. For example, feature, organism, stock, are all base tables. Other tables include linker tables (which link two or more base tables), property tables, and relationship tables. These provide additional information about primary data records and are therefore not base tables. This function retrieves only the list of tables that are considered 'base' tables.

Returns
An array of base table names.

◆ getSchemaDef()

Drupal\tripal_chado\Database\ChadoSchema::getSchemaDef ( array  $parameters)

{Retrieve schema details from selected source in the requested format.

Parameters
array$parametersAn array of key-value parameters:
  • 'source': either 'database' to extract data from database or 'file' to get the data from a static YAML file. Default: 'file'.
  • 'version': version of the Tripal DBX managed schema to fetch from a file. Ignored for 'database' source. Default: implementation specific.
  • 'format': return format, either 'SQL' for an array of SQL string, 'Drupal' for Drupal schema API, 'none' to return nothing or anything else to provide a data structure as returned by TripalDbx::parseTableDdl. If the selected source is 'file', the format parameter will be ignored and 'Drupal' format will be used. Default: TripalDbx::parseTableDdl data structure structure.
  • 'clear': if not empty, cache will be cleared.
Returns
An array with details for the current schema version as defined by $parameters values.
Exceptions
}

Reimplemented from Drupal\tripal\TripalDBX\TripalDbxSchema.


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