dropDatabaseComponents; case QueryType::TABLES: return $this->tablesComponents; case QueryType::FIELDS: return $this->fieldsComponents; case QueryType::CREATE_TABLE: return $this->createTablesComponents; case QueryType::DROP_TABLE: return $this->dropTableComponents; default: return parent::getComponents($type); } } /** * Compile create table query. * * @param BuilderAbstract $query Query * @param string $table Tables to drop * * @return string * * @since 1.0.0 */ protected function compileCreateTable(BuilderAbstract $query, string $table) : string { return 'CREATE TABLE ' . $this->expressionizeTableColumn([$table], $query->getPrefix()); } /** * Compile create table settings query. * * @param BuilderAbstract $query Query * @param bool $settings Has settings * * @return string * * @since 1.0.0 */ protected function compileCreateTableSettings(BuilderAbstract $query, bool $settings) : string { return ''; } /** * Compile drop query. * * @param BuilderAbstract $query Query * @param string $table Tables to drop * * @return string * * @since 1.0.0 */ protected function compileDropDatabase(BuilderAbstract $query, string $table) : string { $expression = $this->expressionizeTableColumn([$table], $query->getPrefix()); if ($expression === '') { $expression = '*'; } return 'DROP DATABASE ' . $expression; } /** * Compile drop query. * * @param BuilderAbstract $query Query * @param string $table Tables to drop * * @return string * * @since 1.0.0 */ protected function compileDropTable(BuilderAbstract $query, string $table) : string { $expression = $this->expressionizeTableColumn([$table], $query->getPrefix()); if ($expression === '') { $expression = '*'; } return 'DROP TABLE ' . $expression; } }