laravel-registry
laravel-registry copied to clipboard
Registry::store() doesn't work with SQLite
The Registry::store() method uses a prepared statement with a hardcoded table name (see #14), but also it uses ON DUPLICATE KEY... which doesn't exist on SQLite:
$this->database->statement("INSERT INTO system_registries ( `key`, `value` ) VALUES ( ?, ? ) ON DUPLICATE KEY UPDATE `key` = ?, `value` = ?",
array($key, $jsonValue, $key, $jsonValue));
This causes the method to not work if you use SQLite as database. It should use some other methods like these ones.
I think you can modify this line, will solve #14 and this one, for:
$this->database->statement("INSERT OR REPLACE INTO ".$this->config['table']." ( `key`, `value` ) VALUES ( ?, ? )", array($key, $jsonValue));