[HttpFoundation] use insert or replace for sqlite session handler
This commit is contained in:
parent
05ea19a4bf
commit
5c08e29b97
@ -236,6 +236,8 @@ class PdoSessionHandler implements \SessionHandlerInterface
|
||||
return "MERGE INTO $this->table USING (SELECT 'x' AS dummy) AS src ON ($this->idCol = :id) " .
|
||||
"WHEN NOT MATCHED THEN INSERT ($this->idCol, $this->dataCol, $this->timeCol) VALUES (:id, :data, :time) " .
|
||||
"WHEN MATCHED THEN UPDATE SET $this->dataCol = :data;";
|
||||
case 'sqlite':
|
||||
return "INSERT OR REPLACE INTO $this->table ($this->idCol, $this->dataCol, $this->timeCol) VALUES (:id, :data, :time)";
|
||||
}
|
||||
|
||||
return null;
|
||||
|
Reference in New Issue
Block a user