/** * Do sharding database by shardId * * @param int $shardId */ private function _doShardDb($shardId = 0) { if (!$this->dbName) { throw new Hush_Db_Exception('Please bind db first'); } // if using default shardId $shardId = $shardId ? $shardId : $this->_shardId; $this->_config->doShardDb($this->dbName, $this->tableName, $shardId); }
/** * Do sharding database by shardId * * @param int $shardId */ private function _doShardDb($shardId = 0) { if (!$this->dbName) { throw new Hush_Db_Exception('Please bind db first'); } // if using default shardId $shardId = $shardId ? $shardId : $this->_shardId; // running callback function $this->_config->doShardDb($this->dbName, $this->tableName, $shardId); // set sharded table name for dao $this->shardDbName = $this->_config->getDbName(); }