Drop all tables.

@param array $metadata
@return array
546669
public function drop(array $metadata)
    {
        $visitor = new DropSchemaSqlCollector($this->platform);

        $schema = $this->getSchemaFromMetadata($metadata);

        $fullSchema = $this->schemaManager->createSchema();

        foreach ($fullSchema->getTables() as $table) {
            if ($schema->hasTable($table->getName())) {
                $visitor->acceptTable($table);
            }
        }

        $statements = $visitor->getQueries();

        $this->build($statements);

        return $statements;
    }
458572
protected function parseMetadata(array $metadata): void
    {
        if (isset($metadata['arrayGroups'])) {
            foreach ($metadata['arrayGroups'] as $name => $values) {
                if (!isset($this->arrayGroups[$name])) {
                    $this->arrayGroups[$name] = array();
                }
                
                foreach ($values as $locale => $keyName) {
                    $this->arrayGroups[$name][$locale] = $keyName;
                }
            }
        }
    }
381124
protected function dropTables()
    {
        $tables = $this->db->query(
            'SHOW FULL TABLES WHERE TABLE_TYPE LIKE "BASE_TABLE"',
            DbAdapter::QUERY_MODE_EXECUTE
        );

        // Disable foreign key checks -- we are wiping the database on purpose
        $this->db->query(
            'SET FOREIGN_KEY_CHECKS = 0',
            DbAdapter::QUERY_MODE_EXECUTE
        );

        foreach ($tables as $table) {
            $this->db->query(
                'DROP TABLE '.reset($table),
                DbAdapter::QUERY_MODE_EXECUTE
            );
        }

        // Re-enable foreign key checks
        $this->db->query(
            'SET FOREIGN_KEY_CHECKS = 1',
            DbAdapter::QUERY_MODE_EXECUTE
        );
    }
1359855
public function drop() {
        
        $conn = ConnectionManager::get('default');

        $stmt1 = $conn->execute('TRUNCATE TABLE aros_acos');
        $info1 = $stmt1->errorInfo();
        if ($info1[1] != null) {
            $this->log($info1, LOG_ERR);
            if(!empty($info1)) {
                $this->Flash->error($info1);
            }
        }
        
        $stmt2 = $conn->execute('TRUNCATE TABLE acos');
        $info2 = $stmt2->errorInfo();
        if ($info2[1] != null) {
            $this->log($info2, LOG_ERR);
            if(!empty($info2)) {
                $this->Flash->error($info2);
            }
        }
        
        $stmt3 = $conn->execute('TRUNCATE TABLE aros');
        $info3 = $stmt3->errorInfo();
        if ($info3[1] != null) {
            $this->log($info3, LOG_ERR);
            if(!empty($info3)) {
                $this->Flash->error($info3);
            }
        }

        $this->Flash->success(__("ACOs and AROs have been dropped."));
        $this->redirect(["action" => "index"]);
    }
125854
public function delete($tables = [])
    {
        parent::delete($tables);
        $compiler = $this->connection->getCompiler();
        return $this->connection->count($compiler->delete($this->sql), $compiler->getParams());
    }
364382
private function sanitizeMetadata(array $metadata)
    {
        array_walk_recursive(
            $metadata,
            function ($value) {
                if (is_object($value) || is_resource($value)) {
                    throw new Exception('Metadata cannot contain objects or resources');
                }
            }
        );

        return $metadata;
    }
408496
public function dropCollections()
    {
        foreach ($this->metadataFactory->getAllMetadata() as $class) {
            if ($class->isMappedSuperclass || $class->isEmbeddedDocument) {
                continue;
            }
            $this->dropDocumentCollection($class->name);
        }
    }
830069
protected function dropDbTables()
    {
        // NOTE: This is optimized to avoid trying to delete tables over & over again.
        // If the app is network-wide and this is a network, there is only one set of tables.

        if ($this->App->Config->§specs['§is_network_wide'] && $this->Wp->is_multisite && $this->site_counter === 1) {
            $this->s::dropDbTables(); // Drop the network-wide tables for this app, just once.
            //
        } elseif (!$this->App->Config->§specs['§is_network_wide'] || !$this->Wp->is_multisite) {
            $this->s::dropDbTables(); // The table prefix changes for each site.
            // And, of course, this covers a standard WP installation also.
        }
    }
64763
private function getProperties(ClassMetadata $metadata)
    {
        return array_merge(
            $metadata->getFieldNames(),
            array_map(function (array $mapping) {
                return $mapping['fieldName'];
            }, $metadata->getEmbeddedFieldsMappings())
        );
    }
398624
protected function onMetaReceived($metaData)
    {
        $keys = array_keys($metaData["columns"]);
        $values = array_values($metaData["columns"]);

        for ($i = 0; $i < count($keys); $i++) {
            if (isset($this->params[$keys[$i]])) {
                $keys[$i] = $this->params[$keys[$i]];
            }
        }
        $metaData["columns"] = array_combine($keys, $values);
        return $metaData;
    }
1355870
public function getMetadataQuery($data, $metadata)
    {
        foreach ($metadata as $searchMetadata) {
            $data[] = $this->setData(['metadata' => $searchMetadata], 'input');
        }

        return $data;
    }
730543
public function DeleteTable(\Google\Cloud\Bigtable\Admin\V2\DeleteTableRequest $argument,
      $metadata = [], $options = []) {
        return $this->_simpleRequest('/google.bigtable.admin.v2.BigtableTableAdmin/DeleteTable',
        $argument,
        ['\Google\Protobuf\GPBEmpty', 'decode'],
        $metadata, $options);
    }
1324682
private function extractIdAndType(EntityMetadata $metadata, array &$data)
    {
        $identifier = $this->extractField(Persister::IDENTIFIER_KEY, $data);
        unset($data[Persister::IDENTIFIER_KEY]);

        $key = Persister::POLYMORPHIC_KEY;
        $type = $this->extractType($metadata, $data);
        if (isset($data[$key])) {
            unset($data[$key]);
        }
        return [$identifier, $type];
    }
958269
public function drop(string $table)
    {
        $compiler = $this->connection->schemaCompiler();

        $result = $compiler->drop($table);

        $this->connection->command($result['sql'], $result['params']);

        //clear table list
        $this->tableList = null;
        unset($this->columns[strtolower($table)]);
    }
1241414
private function generateDocumentBody(array $metadata)
    {
        $lines = [];

        if ($properties = $this->generateDocumentProperties($metadata)) {
            $lines[] = $properties;
        }

        if ($this->hasMultipleEmbedded($metadata)) {
            $lines[] = $this->generateDocumentConstructor($metadata);
        }

        if ($methods = $this->generateDocumentMethods($metadata)) {
            $lines[] = $methods;
        }

        return rtrim(implode("\n", $lines));
    }
1270213
protected function generateTableAnnotation($metadata)
    {
        if ($metadata->isEmbeddedClass) {
            return '';
        }

        $table = array();

        if (isset($metadata->table['schema'])) {
            $table[] = 'schema="' . $metadata->table['schema'] . '"';
        }

        if (isset($metadata->table['name'])) {
            $table[] = 'name="' . $metadata->table['name'] . '"';
        }

        if (isset($metadata->table['options']) && $metadata->table['options']) {
            $table[] = 'options={' . $this->exportTableOptions((array) $metadata->table['options']) . '}';
        }

        if (isset($metadata->table['uniqueConstraints']) && $metadata->table['uniqueConstraints']) {
            $constraints = $this->generateTableConstraints('UniqueConstraint', $metadata->table['uniqueConstraints']);
            $table[] = 'uniqueConstraints={' . $constraints . '}';
        }

        if (isset($metadata->table['indexes']) && $metadata->table['indexes']) {
            $constraints = $this->generateTableConstraints('Index', $metadata->table['indexes']);
            $table[] = 'indexes={' . $constraints . '}';
        }

        return '@' . $this->annotationsPrefix . 'Table(' . implode(', ', $table) . ')';
    }
1188808
public function deleteAll() {

        $tablenames = $this->getAllTableNames();
        foreach ($tablenames as $tablename) {
            $this->databaseConnection->query("DROP TABLE " . $tablename);
        }

    }