Class DB_schema

Description

Class describing a Postgres database schema.

Located in /pg-schema-defs.php (line 974)

SchemaObject
   |
   --schema
      |
      --DB_schema
Method Summary
 DB_schema DB_schema (string $name)
 void capable_of ([mixed $capability = ""])
 void getfunctions ()
 void getschema_table (string $tablename)
 void getsequences ()
 void gettables ()
 void gettriggers ()
 void getversion ()
Variables
Methods
Constructor DB_schema (line 981)

Create a schema (database) of given name & type. The name should be a valid existing database name that is currently connected.

DB_schema DB_schema (string $name)
  • string $name: Name of this particular database
capable_of (line 990)

Return database capabilities. There are specific capabilities which the diff code needs to query, and this method should be overridden in the specific database module to answer those questions.

void capable_of ([mixed $capability = ""])

Redefinition of:
schema::capable_of()
Return database capabilities. There are specific capabilities which the diff code needs to query, and this method should be overridden in the specific database module to answer those questions.
getfunctions (line 1079)

Populates our array of functions with all user functions in this schema.

void getfunctions ()
getschema_table (line 1121)

Acquire the schema details of a specific Postgres table. This method is provided to cater for the common requirement of acquiring details for a specific table, without having to endure the overhead of reading all of the database schema metadata to get it.

void getschema_table (string $tablename)
  • string $tablename: Name of the table to acquire schema of

Redefinition of:
schema::getschema_table()
Acquire the schema details of a specific database table. This method is provided to cater for the common requirement of acquiring details for a specific table, without having to endure the overhead of reading all of the database schema metadata to get it.
getsequences (line 1097)

Populates our array of sequences with all user sequences in this schema.

void getsequences ()

Redefinition of:
schema::getsequences()
Populates schema sequences.
gettables (line 1038)

Populates our array of tables with all tables in this schema.

void gettables ()

Redefinition of:
schema::gettables()
Populates schema tables.
gettriggers (line 1059)

Populates our array of triggers with all user triggers in this schema.

void gettriggers ()

Redefinition of:
schema::gettriggers()
Populates schema triggers.
getversion (line 1135)

Acquire the Postgres database version. We make some gross assumptions here with regard to standard local Postgres setup. Change as necessary.

Currently we have a shot at either the Debian standard location which is '/usr/lib/postgresql', or the 'other' standard of '/usr/bin'. To-do: acquire Postgres binaries location in a more robust way.

void getversion ()

Redefinition of:
schema::getversion()
Acquire the database version.

Inherited Methods

Inherited From schema

 schema::schema()
 schema::addconstraint()
 schema::addfunction()
 schema::addsequence()
 schema::addtable()
 schema::addtrigger()
 schema::capable_of()
 schema::constraint_exists()
 schema::diff()
 schema::dump()
 schema::getconstraint()
 schema::getfunction()
 schema::getindex()
 schema::getschema()
 schema::getschema_table()
 schema::getsequence()
 schema::getsequences()
 schema::gettable()
 schema::gettables()
 schema::gettrigger()
 schema::gettriggers()
 schema::getversion()
 schema::index_exists()
 schema::set_dbversion()

Inherited From SchemaObject

 SchemaObject::SchemaObject()

Documentation generated by phpDocumentor 1.3.0RC3