Add a table

@param string $name
@throws \NonDB\Exceptions\DriverException

@return \NonDB\Components\Status
437887
public function newTable(string $name){
            
            $status = file_put_contents($file = $this->base . '/' . $name . '.json', "[]");

            return new \NonDB\Components\Status($status);

        }
6390
public function add(string $name, SwooleTable $table)
    {
        $this->tables[$name] = $table;

        return $this;
    }
185789
public function addInputNumber(string $name) : Element\Input\Number
    {
        $input = new Element\Input\Number($this, $name);
        $this->addComponent($name, $input);

        return $input;
    }
1109650
function addName($name) {
    if (isset($this->children[$name])) {
      throw new \Exception("Name '$name' already exists.");
    }
    $this->internalAddName($name);
    return $this;
  }
499659
public function addInputColor(string $name) : Element\Input\Color
    {
        $input = new Element\Input\Color($this, $name);
        $this->addComponent($name, $input);

        return $input;
    }
274683
public function load($name)
    {
        if (!self::tableExists($name)) {
            throw new SystemException(sprintf('The table with name %s doesn\'t exist', $name));
        }

        $schema = self::getSchemaManager()->createSchema();

        $this->name = $name;
        $this->tableInfo = $schema->getTable($this->name);
        $this->loadColumnsFromTableInfo();
        $this->exists = true;
    }
909442
public function addName($name)
    {
        if (!in_array('names', $this->setFields)) {
            $this->setFields[] = 'names';
        }
        $this->names[] = $name;

        return $this;
    }
1241621
private function addBasicProviderNode($name)
    {
        $builder = new TreeBuilder($name);
        $node    = $this->getRootNode($builder, $name);

        return $node;
    }
1287207
public function addTable($table)
    {
        if (!$table instanceof Table) {
            $tbl = new Table();
            $tbl->setDatabase($this);
            $tbl->loadMapping($table);

            return $this->addTable($tbl);
        }

        $table->setDatabase($this);

        if (isset($this->tablesByName[$table->getName()])) {
            throw new EngineException(sprintf('Table "%s" declared twice', $table->getName()));
        }

        $this->tables[] = $table;
        $this->tablesByName[$table->getName()] = $table;
        $this->tablesByLowercaseName[strtolower($table->getName())] = $table;
        $this->tablesByPhpName[$table->getPhpName()] = $table;

        $this->computeTableNamespace($table);

        if (null === $table->getPackage()) {
            $table->setPackage($this->getPackage());
        }

        return $table;
    }
1271619
public function removeTable(string $name){

            $status = unlink($file = $this->base . '/' . $name . '.json');
            
            return new \NonDB\Components\Status($status);

        }
495597
public function getTable($name, $new = false)
    {
        if (empty($this->tables[$name]) || $new) {
            $class = sprintf('Windwalker\\Database\\Driver\\%s\\%sTable', ucfirst($this->name), ucfirst($this->name));

            $this->tables[$name] = new $class($name, $this);
        }

        return $this->tables[$name];
    }
942505
public function create($name = '')
    {
        $tables = $this->argument('tables') ? $this->argument('tables') : '*';
        $return = BackupFacade::backup($tables, $name);
        if (true === $return) {
            $this->info(sprintf('%s backup file generated in %s path', $name,
                BackupLoader::generatePath($name)));
        } else {
            $this->error(sprintf('%s cant create, file already exists', $name));
        }
    }
72736
public function add($name)
    {
        if (isset($this->indexes[$name])) {
            return $this->indexes[$name];
        }
        $this->context->getMappings();
        $index = count($this->names);
        $this->names[] = $name;
        $this->indexes[$name] = $index;
        return $index;
    }
81129
public function addTextarea(string $name) : Element\Textarea
    {
        $textarea = new Element\Textarea($this, $name);
        $this->addComponent($name, $textarea);

        return $textarea;
    }
1149088
public function addForeignKey($name, $table, $key)
    {
        $this->keys[$name] = [$table, $key];
        return $this;
    }
276077
public static function drop($name)
    {
        if (self::existe($name)) {
            $name = self::table($name);
            //
            return Database::exec('DROP TABLE '.$name);
        } else {
            throw new SchemaTableNotExistException($name);
        }
    }
824295
public function table($tableName)
    {
        return new Table(
            $this->dbManager,
            $this->connectionName,
            $tableName,
            $this->getStructure($this->connectionName)
        );
    }