Subject: SQLITE :memory: databases and Connection::instance()
I can't seem to be getting an instance of Connection whilst using an in memory Sqlite database. Here's the code:
$config = ActiveRecord\Config::instance();
$config->set_model_directory('models');
$config->set_connections(array(
'sqlite'=>'sqlite://uas.sqlite' # This works
'sqlite'=>'sqlite::memory:' # This won't work
), 'sqlite');
I get a "Fatal error: Uncaught exception 'ActiveRecord\DatabaseException' with message 'Database host must be specified in the connection string.' in E:\Dropbox\My Dropbox\Projects\PHP\uas\libs\php-activerecord\lib\Connection.php on line 146" if I try to get the connection to the in memory database, but it works as expected using the file database.
Subject: SQLITE :memory: databases and Connection::instance()
I can't seem to be getting an instance of Connection whilst using an in memory Sqlite database. Here's the code:
$config = ActiveRecord\Config::instance();$config->set_model_directory('models');
$config->set_connections(array(
'sqlite'=>'sqlite://uas.sqlite' # This works
), 'sqlite');
$connection = ActiveRecord\Connection::instance('sqlite');
I get a "Fatal error: Uncaught exception 'ActiveRecord\DatabaseException' with message 'Database host must be specified in the connection string.' in E:\Dropbox\My Dropbox\Projects\PHP\uas\libs\php-activerecord\lib\Connection.php on line 146" if I try to get the connection to the in memory database, but it works as expected using the file database.
Any ideas?