fullData = $data['data']; if (strlen($data['data']) > self::CHUNK_SIZE) { $data['data'] = substr($data['data'], 0, self::CHUNK_SIZE); $this->openTransaction(); } } protected function didWriteData() { $size = self::CHUNK_SIZE; $length = strlen($this->fullData); if ($length > $size) { $conn = $this->establishConnection('w'); for ($offset = $size; $offset < $length; $offset += $size) { queryfx( $conn, 'UPDATE %T SET data = CONCAT(data, %s) WHERE %C = %d', $this->getTableName(), substr($this->fullData, $offset, $size), $this->getIDKeyForUse(), $this->getID()); } $this->saveTransaction(); } parent::didWriteData(); } }