diff --git a/src/Database.php b/src/Database.php index 3f61550..0308b89 100644 --- a/src/Database.php +++ b/src/Database.php @@ -57,8 +57,10 @@ class Database extends PDO if (isset($dsn['schema'])) { $connection->query('SET search_path TO ' . $dsn['schema']); } - } - if ($dsn['phptype'] == 'sqlite') { + } elseif ($dsn['phptype'] == 'sqlite::memory') { + $connection = new self("{$dsn['phptype']}:"); + $connection->sqliteCreateFunction('LOWER', 'sqliteLower', 1); + } elseif ($dsn['phptype'] == 'sqlite') { $connection/*: Database*/ = new self("{$dsn['phptype']}:{$dsn['database']}"); $connection->setAttribute(PDO::ATTR_TIMEOUT, 5); $mode = defined('SQLITE_JOURNAL_MODE') ? SQLITE_JOURNAL_MODE : 'WAL';