private function initSqlite()
{
// enable foreign key support
$this->connection->exec('PRAGMA foreign_keys = ON');
$params = $this->connection->getParams();
if (!isset($params['path'])) {
return;
}
$this->connection->getWrappedConnection()->sqliteCreateFunction('regexp', function ($expr, $string) {
return preg_match('{' . $expr . '}', $string);
}, 2);
}