Tripal
Public Member Functions | Protected Attributes | List of all members
Drupal\tripal\Services\bulkPgSchemaInstaller Class Reference
Inheritance diagram for Drupal\tripal\Services\bulkPgSchemaInstaller:
Inheritance graph
[legend]

Public Member Functions

 __construct ()
 
 setSchema ($schema_name)
 
 setJob (\Drupal\tripal\Services\TripalJob $job)
 
 getDrupalConnection ()
 
 getPgConnection ()
 
 getLogger ()
 
 dropSchema ($schema_name)
 
 createSchema ($schema_name)
 
 checkSchema ($schema_name)
 
 applySQL ($sql_file, $schema_name=FALSE, $append_search_path=FALSE)
 

Protected Attributes

 $schemaName
 
 $connection
 
 $pgconnection
 
 $logger
 
 $job = NULL
 

Constructor & Destructor Documentation

◆ __construct()

Drupal\tripal\Services\bulkPgSchemaInstaller::__construct ( )

Constructor: initialize connections.

Member Function Documentation

◆ applySQL()

Drupal\tripal\Services\bulkPgSchemaInstaller::applySQL (   $sql_file,
  $schema_name = FALSE,
  $append_search_path = FALSE 
)

Applies all statements from an SQL file to the current database.

Parameters
string$fileThe full path and name of the file containing the SQL statements.
Returns
bool Whether the application succeeded.

◆ checkSchema()

Drupal\tripal\Services\bulkPgSchemaInstaller::checkSchema (   $schema_name)

Check that the schema is present.

Parameters
string$schema_nameThe name of the schema you would like to check for existance of.
Returns
bool Whether or not the schema exists.

◆ createSchema()

Drupal\tripal\Services\bulkPgSchemaInstaller::createSchema (   $schema_name)

Create the specified schema.

Parameters
string$schema_nameThe name of the schema you would like to create.
Returns
bool Whether or not the creation was successful.

◆ dropSchema()

Drupal\tripal\Services\bulkPgSchemaInstaller::dropSchema (   $schema_name)

Drops the specified schema.

Parameters
string$schema_nameThe name of the schema you would like to drop.
Returns
bool Whether or not dropping was successful.

◆ getDrupalConnection()

Drupal\tripal\Services\bulkPgSchemaInstaller::getDrupalConnection ( )

Retrieve the Drupal connection to the database.

Returns
Drupal\database Current Drupal connection.

◆ getLogger()

Drupal\tripal\Services\bulkPgSchemaInstaller::getLogger ( )

Retrieves the message logger.

Returns
object

◆ getPgConnection()

Drupal\tripal\Services\bulkPgSchemaInstaller::getPgConnection ( )

Retrieves the PostgreSQL-specific connection to the database.

Returns
object PostgreSQL connection resource on success, FALSE on failure.

◆ setJob()

Drupal\tripal\Services\bulkPgSchemaInstaller::setJob ( \Drupal\tripal\Services\TripalJob  $job)

A setter for the job object if this class is being run using a Tripal job.

◆ setSchema()

Drupal\tripal\Services\bulkPgSchemaInstaller::setSchema (   $schema_name)

Set the schema name.

Member Data Documentation

◆ $connection

Drupal\tripal\Services\bulkPgSchemaInstaller::$connection
protected

The DRUPAL-managed database connection.

◆ $job

Drupal\tripal\Services\bulkPgSchemaInstaller::$job = NULL
protected

Holds the Job object

◆ $logger

Drupal\tripal\Services\bulkPgSchemaInstaller::$logger
protected

The drupal logger for tripal.

◆ $pgconnection

Drupal\tripal\Services\bulkPgSchemaInstaller::$pgconnection
protected

The PHP-managed postgreSQL-specific connection. NOTE: required to execute multiple-statement strings.

◆ $schemaName

Drupal\tripal\Services\bulkPgSchemaInstaller::$schemaName
protected

The name of the schema we are interested in applying SQL to.


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