Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Commit

Permalink
Add Docblocks and annotate unit test as #3719
Browse files Browse the repository at this point in the history
  • Loading branch information
ashawley committed Mar 7, 2013
1 parent a4b782d commit c2084aa
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
36 changes: 36 additions & 0 deletions library/Zend/Db/Metadata/Source/AbstractSource.php
Expand Up @@ -506,10 +506,18 @@ protected function prepareDataHierarchy($type)
}
}

/**
* Load schema data
*/
protected function loadSchemaData()
{
}

/**
* Load table name data
*
* @param string $schema
*/
protected function loadTableNameData($schema)
{
if (isset($this->data['table_names'][$schema])) {
Expand All @@ -519,6 +527,12 @@ protected function loadTableNameData($schema)
$this->prepareDataHierarchy('table_names', $schema);
}

/**
* Load column data
*
* @param string $table
* @param string $schema
*/
protected function loadColumnData($table, $schema)
{
if (isset($this->data['columns'][$schema][$table])) {
Expand All @@ -528,6 +542,12 @@ protected function loadColumnData($table, $schema)
$this->prepareDataHierarchy('columns', $schema, $table);
}

/**
* Load constraint data
*
* @param string $table
* @param string $schema
*/
protected function loadConstraintData($table, $schema)
{
if (isset($this->data['constraints'][$schema])) {
Expand All @@ -537,6 +557,11 @@ protected function loadConstraintData($table, $schema)
$this->prepareDataHierarchy('constraints', $schema);
}

/**
* Load constraint data keys
*
* @param string $schema
*/
protected function loadConstraintDataKeys($schema)
{
if (isset($this->data['constraint_keys'][$schema])) {
Expand All @@ -546,6 +571,12 @@ protected function loadConstraintDataKeys($schema)
$this->prepareDataHierarchy('constraint_keys', $schema);
}

/**
* Load constraint references
*
* @param string $table
* @param string $schema
*/
protected function loadConstraintReferences($table, $schema)
{
if (isset($this->data['constraint_references'][$schema])) {
Expand All @@ -555,6 +586,11 @@ protected function loadConstraintReferences($table, $schema)
$this->prepareDataHierarchy('constraint_references', $schema);
}

/**
* Load trigger data
*
* @param string $schema
*/
protected function loadTriggerData($schema)
{
if (isset($this->data['triggers'][$schema])) {
Expand Down
3 changes: 3 additions & 0 deletions tests/ZendTest/Db/Metadata/Source/SqliteMetadataTest.php
Expand Up @@ -82,6 +82,9 @@ public function testGetConstraints()
);
}

/**
* @group ZF2-3719
*/
public function testGetConstraintKeys()
{
$keys = $this->metadata->getConstraintKeys(
Expand Down

0 comments on commit c2084aa

Please sign in to comment.