Skip to content

Commit

Permalink
Added default schema for check integrity (See #10)
Browse files Browse the repository at this point in the history
  • Loading branch information
edgardmessias committed Apr 24, 2018
1 parent eec5008 commit 6cd1ad3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/QueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

/**
* QueryBuilder is the query builder for DB2 databases.
*
* @property Connection $db Connetion
*
* @author Edgard Lorraine Messias <edgardmessias@gmail.com>
* @author Nikita Verkhovin <vernik91@gmail.com>
Expand Down Expand Up @@ -85,6 +87,10 @@ public function checkIntegrity($check = true, $schema = '', $table = '')
if ($table) {
$tableNames = [$table];
} else {
if (!$schema) {
$schema = $this->db->defaultSchema;
}

//Return only tables
$sql = "SELECT t.tabname FROM syscat.tables AS t"
. " WHERE t.type in ('T') AND t.ownertype != 'S'";
Expand Down

0 comments on commit 6cd1ad3

Please sign in to comment.