Tripal
Public Member Functions | Static Public Member Functions | Static Protected Attributes | List of all members
ChadoPrefixExtender Class Reference
Inheritance diagram for ChadoPrefixExtender:
Inheritance graph
[legend]
Collaboration diagram for ChadoPrefixExtender:
Collaboration graph
[legend]

Public Member Functions

 addJoin ($type, $table, $alias=NULL, $condition=NULL, $arguments=[])
 
 join ($table, $alias=NULL, $condition=NULL, $arguments=[])
 
 innerJoin ($table, $alias=NULL, $condition=NULL, $arguments=[])
 
 leftJoin ($table, $alias=NULL, $condition=NULL, $arguments=[])
 
 rightJoin ($table, $alias=NULL, $condition=NULL, $arguments=[])
 

Static Public Member Functions

static select ($table, $alias=NULL, array $options=[])
 
static isChadoTable ($table)
 
static getTable ($table)
 
static getRealSchema ($table)
 
static makeAlias ($table)
 

Static Protected Attributes

static $chado_tables = []
 

Detailed Description

ChadoPrefixExtender

A query extender that for select queries. By extending the SelectQueryExtender class, we can make sure that chado tables

See also
https://www.drupal.org/docs/7/api/database-api/dynamic-queries/extenders

Member Function Documentation

◆ addJoin()

ChadoPrefixExtender::addJoin (   $type,
  $table,
  $alias = NULL,
  $condition = NULL,
  $arguments = [] 
)
Parameters
$type
$table
null$alias
null$condition
array$arguments
Returns
$this
See also
SelectQueryInterface::addJoin()

◆ getRealSchema()

static ChadoPrefixExtender::getRealSchema (   $table)
static

Allows altered schema names to be replaces correctly.

Parameters
string$tableThe table name with a prefix such as "chado." or "public."
Returns
mixed The table name with the correct prefix.

◆ getTable()

static ChadoPrefixExtender::getTable (   $table)
static

If the table name has a schema name as a prefix, replace it with the correct schema name.

Parameters
string$tableThe table name.
Returns
string The table with the correct prefix.

◆ isChadoTable()

static ChadoPrefixExtender::isChadoTable (   $table)
static

Checks if a table is a chado table.

Parameters
string$tableThe table name.
Returns
bool

◆ makeAlias()

static ChadoPrefixExtender::makeAlias (   $table)
static

Create a safe alias.

Parameters
string$tableTable name.
Returns
string The safe alias.

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