Sets the default database

@param string $table The name of the table

@return Collection
176651
public function setTable($table)
    {
        $this->table = $table;

        //for each row
        foreach ($this->data as $row) {
            if (!is_object($row) || !method_exists($row, __FUNCTION__)) {
                continue;
            }

            //let the row handle this
            $row->setTable($table);
        }

        return $this;
    }
1193761
public function lockTable($table)
	{
		$query = $this->getQuery(true);

		$this->setQuery('LOCK TABLES ' . $this->quoteName($table) . ' WRITE');

		$this->setQuery($query)->execute();

		return $this;
	}
1294520
public function getSqlCreateTable($table)
    {
        if (empty($this->sqlCreateTable[$table])) {
            $query = $this->pdo->query("SHOW CREATE TABLE $table");

            $this->sqlCreateTable[$table] = $query->fetchColumn(1);
        }

        return $this->sqlCreateTable[$table];
    }
184866
public function setJunction($table) {
        if (!is_array($table)) {
            $table = ['table' => $table];
        }

        $this->setConfig('junction', $table);

        return $this;
    }
758264
public function setDb( string $db ) : SQLite
   {

      if ( ! $this->_supportedAttributes->get( 'db' )->validateValue( $db ) )
      {
         throw new ArgumentException( 'db', $db, 'Invalid database!' );
      }

      $this->_attributes[ 'db' ] = $db;

      return $this;

   }
772104
public function setDatabase($database = [], $name = 'default')
    {
        $this->database = $database;
        $this->dbName   = $name;

        return $this;
    }
342252
public function reset_sequence($table) {
        if (!is_string($table) and !($table instanceof xmldb_table)) {
            throw new ddl_exception('ddlunknownerror', NULL, 'incorrect table parameter!');
        } else {
            if ($table instanceof xmldb_table) {
                $tablename = $table->getName();
            } else {
                $tablename = $table;
            }
        }

        // Do not test if table exists because it is slow

        if (!$sqlarr = $this->generator->getResetSequenceSQL($table)) {
            throw new ddl_exception('ddlunknownerror', null, 'table reset sequence sql not generated');
        }

        $this->execute_sql_arr($sqlarr, array($tablename));
    }
595188
public function setTable($table) {

		if(false === is_string($table)) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($table)), E_USER_ERROR);
		}

		$this -> table = $table;

		return $this;
	}
1091333
public function setTable($table)
    {
        //Argument 1 must be a string
        Argument::i()->test(1, 'string');
        
        $this->table = $table;
        
        //for each row
        foreach ($this->list as $row) {
            if (!is_object($row) || !method_exists($row, __FUNCTION__)) {
                continue;
            }
            
            //let the row handle this
            $row->setTable($table);
        }
        
        return $this;
    }
970558
public function insert($table = null)
    {
        $this->type = self::TYPE_INSERT;
        if ($table) {
            $this->table($table);
        }

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

        return $this;
    }
1120828
public function update(string $table) {
		// set the main action
		$this->action('UPDATE');
		// set the destination table
		list($this->Table) = Query\Convert::columnToPlaceholder($this->Quote ,$table);
		// return self to the next method
		return $this;
	}
967381
public function truncateTable($table)
    {
        $query = "TRUNCATE " . $this->getName($table->getName());
        $this->db->exec($query);
        return $this;
    }
12011
public function drop($table = '')
    {
        $tableName = '';

        $tableName = ($table !== '') ?
            $table : $this->tableName;

        $this->schema = strtoupper(__FUNCTION__).' TABLE IF EXISTS
        `'.$this->database.'`.`'.$tableName.'`'.PHP_EOL;

        return $this;
    }
941211
public function setDefaultSource($defaultSource = self::DEFAULT_NONE)
    {
        if (!in_array($defaultSource, array(self::DEFAULT_CLASS, self::DEFAULT_DB, self::DEFAULT_NONE))) {
            $defaultSource = self::DEFAULT_NONE;
        }

        $this->_defaultSource = $defaultSource;
        return $this;
    }
150623
public function table($table)
    {
        $ar = static::cyrus();
        $ar->setTableName($table);
        static::$dataSource = true;

        return $this;
    }
1364804
public function table($table = null)
    {
        if ($table !== null) {
            $this->table = $table;
        }

        return $this->table;
    }