Tripal 0.3b
External Database Views Integration

Functions

 tripal_db_views_data ()
 tripal_db_views_handlers ()
 tripal_db_views_default_views ()
 retrieve_db_views_data ()
 retrieve_dbxref_views_data ()

Function Documentation

retrieve_db_views_data ( )

Purpose: this function returns the portion of the data array which describes the cv table, it's fields and any joins between it and other tables

See also:
tripal_cv_views_data() --in tripal_cv.views.inc

TABLE: db

 create table db (
    db_id serial not null,
    primary key (db_id),
    name varchar(255) not null,
    description varchar(255) null,
    urlprefix varchar(255) null,
    url varchar(255) null,
    constraint db_c1 unique (name)
 );

Definition at line 23 of file db.views.inc.

Referenced by tripal_db_views_data().

retrieve_dbxref_views_data ( )

Purpose: this function returns the portion of the data array which describes the db table, it's fields and any joins between it and other tables

See also:
tripal_db_views_data() --in tripal_db.views.inc

BASE TABLE: dbxref

 create table dbxref (
    dbxref_id serial not null,
    primary key (dbxref_id),
    db_id int not null,
    foreign key (db_id) references db (db_id) on delete cascade INITIALLY DEFERRED,
    accession varchar(255) not null,
    version varchar(255) not null default '',
    description text,
    constraint dbxref_c1 unique (db_id,accession,version)
 );

Definition at line 24 of file dbxref.views.inc.

Referenced by tripal_db_views_data().

tripal_db_views_data ( )

Implements hook_views_data() Purpose: Describe chado/tripal tables & fields to views

Returns:
: a data array which follows the structure outlined in the views2 documentation for this hook. Essentially, it's an array of table definitions keyed by chado/tripal table name. Each table definition includes basic details about the table, fields in that table and relationships between that table and others (joins)

Definition at line 32 of file tripal_db.views.inc.

References retrieve_db_views_data(), and retrieve_dbxref_views_data().

tripal_db_views_default_views ( )

Definition at line 67 of file tripal_db.views.inc.

tripal_db_views_handlers ( )

Implements hook_views_handlers() Purpose: Register all custom handlers with views where a handler describes either "the type of field", "how a field should be filtered", "how a field should be sorted"

Returns:
: An array of handler definitions

Definition at line 50 of file tripal_db.views.inc.

 All Classes Files Functions Variables