conn->executeUpdate('LOCK TABLES `' .$tableName . '` WRITE'); } public function unlockTable() { $this->conn->executeUpdate('UNLOCK TABLES'); } public function fixupStatement($statement) { $statement = str_replace(' ILIKE ', ' COLLATE ' . $this->getCollation() . ' LIKE ', $statement); return $statement; } protected function getCollation(): string { if (!$this->collation) { $params = $this->conn->getParams(); $this->collation = $params['collation'] ?? (($params['charset'] ?? 'utf8') . '_general_ci'); } return $this->collation; } }