コード例 #1
0
ファイル: ShowExecutor.php プロジェクト: addiks/phpsql
 public function executeJob(StatementJob $statement, array $parameters = array())
 {
     /* @var $statement ShowStatement */
     switch ($statement->getType()) {
         case ShowType::DATABASES():
             return $this->executeShowDatabases($statement, $parameters);
         case ShowType::TABLES():
             return $this->executeShowTables($statement, $parameters);
         case ShowType::VIEWS():
             return $this->executeShowViews($statement, $parameters);
         case ShowType::COLUMNS():
             return $this->executeShowColumns($statement, $parameters);
     }
 }
コード例 #2
0
ファイル: DropExecutor.php プロジェクト: addiks/phpsql
 public function executeJob(StatementJob $statement, array $parameters = array())
 {
     /* @var $statement DropStatement */
     $context = new ExecutionContext($this->schemaManager, $statement, $parameters);
     switch ($statement->getType()) {
         case DropStatement::TYPE_DATABASE:
             return $this->executeDropDatabase($statement, $context);
         case DropStatement::TYPE_TABLE:
             return $this->executeDropTable($statement, $context);
         case DropStatement::TYPE_VIEW:
             return $this->executeDropView($statement, $context);
     }
     foreach ($this->tableManager->getTableFactories() as $tableFactory) {
         /* @var $tableFactory TableFactoryInterface */
         if ($tableFactory instanceof InformationSchemaTableFactory) {
             $tableFactory->clearCache();
         }
     }
 }