指定当前的数据表
@access public
@param mixed $table
@return Model
340343
public function table($table) {
        $prefix =   $this->tablePrefix;
        if(is_array($table)) {
            $this->options['table'] =   $table;
        }elseif(!empty($table)) {
            //将__TABLE_NAME__替换成带前缀的表名
            $table  = preg_replace_callback("/__([A-Z0-9_-]+)__/sU", function($match) use($prefix){ return $prefix.strtolower($match[1]);}, $table);
            $this->options['table'] =   $table;
        }
        return $this;
    }
367847
public static function table($table, $db = 'default') {
        /**@var \wulaphp\db\SimpleTable[][] $tables */
        static $tables = [];
        try {
            $dbid = get_unique_id($db);
            if (!isset($tables[ $dbid ][ $table ])) {
                $tables[ $dbid ][ $table ] = new SimpleTable($table, $db);
            } else {
                $tables[ $dbid ][ $table ]->db(DatabaseConnection::connect($db));
            }

            return $tables[ $dbid ][ $table ];
        } catch (\Exception $e) {
            return null;
        }
    }
668532
public function optimize($table = null)
        {
            $table = empty($table) ? $this->_tableName : $table;
            $this->_query("OPTIMIZE TABLE " . $table);

            return $this;
        }
217087
public function from($table)
    {
        $this->fromTable = (is_null($table)) ? get_class($this) : $table;

        return $this;
    }
899737
public static function insert($table = null)
    {
        $query = new Insert();

        if ($table) {
            $query->into($table);
        }

        return $query;
    }
1090862
public function updateTable($table, ...$tables)
    {
        $instance = $this->updateQueryInstance();

        $instance->updateQuery()->table($table, ...$tables);

        return $instance;
    }
143847
public function from($table) 
    {    
        $this->fromTable = $table;
        $this->sql .= 'FROM ' . $this->quoteTableName($table);
        
        return $this;
    }
1095254
final public function fetchTableDef(string $table) {
        $tableKey = strtolower($table);

        // First check the table cache.
        if (isset($this->tables[$tableKey])) {
            $tableDef = $this->tables[$tableKey];

            if (isset($tableDef['columns'], $tableDef['indexes'])) {
                return $tableDef;
            }
        } elseif ($this->tableNames !== null && !isset($this->tableNames[$tableKey])) {
            return null;
        }

        $tableDef = $this->fetchTableDefDb($table);
        if ($tableDef !== null) {
            $this->fixIndexes($tableDef['name'], $tableDef);
            $this->tables[$tableKey] = $tableDef;
        }

        return $tableDef;
    }
277772
public function update($table) {
        $obj = new UpdateRule(new Context($this->connection));
        return $obj->update($table);
    }
1351524
protected function newTable($table = null)
    {
        return new Table(
            static::$dbManager,
            $this->connectionName,
            $table ? : $this->tableName,
            static::$dbManager->getStructure($this->connectionName)
        );
    }
837827
public function addTable($table)
    {
        if (!in_array($table, $this->tables))
        {
            $this->tables[] = $table;
        }

        return $this;
    }
1131203
public function with($table)
    {
        Validate::relation($this->tables['local'], $table);
        $this->setTable('foreign', $table);
        $this->setRelationType(Config::table($this->tables['local'])->relations($this->tables['foreign'])->type);
        $this->setKey('local', Config::table($this->tables['local'])->relations($this->tables['foreign'])->keys->local);
        $this->setKey('foreign', Config::table($this->tables['local'])->relations($this->tables['foreign'])->keys->foreign);

        return $this;
    }
1128530
public function setTable($table)
    {
        $this->table = 'post_'.cleanPostTypeSlug($table);
        self::$_tmptable = $this->table;
        return $this;
    }
685250
public function from($table, ...$tables)
    {
        $instance = $this->fromStrategyInstance();

        $instance->fromStrategy()->from($table, ...$tables);

        return $instance;
    }
1317240
public function delete($table = null)
    {
        $this->type = self::TYPE_DELETE;
        if ($table) {
            $this->table($table);
        }

        return $this;
    }
697815
protected function makeTable($table): ?Table
    {
        // 如果是字符串,那么应该是表名,创建表对象
        if (is_string($table)) {
            return table($table);
        }

        // 如果已经是表对象,返回
        if ($table instanceof Table) {
            return $table;
        }

        return null;
    }
502160
public function repair($table = null)
        {
            $table = empty($table) ? $this->_tableName : $table;
            $this->_query("REPAIR TABLE " . $table);

            return $this;
        }