$this->username =
$options['db_username'
] ??
$this->username;
$this->password =
$options['db_password'
] ??
$this->password;
$this->connectionOptions =
$options['db_connection_options'
] ??
$this->connectionOptions;
} /**
* @return void
*/
public function save(Key
$key) { // prevent concurrency within the same connection
$this->
getInternalStore()->
save($key);
$lockAcquired = false;
try { $sql = 'SELECT pg_try_advisory_lock(:key)';
$stmt =
$this->
getConnection()->
prepare($sql);
$stmt->
bindValue(':key',
$this->
getHashedKey($key));
$result =
$stmt->
execute();
// Check if lock is acquired
if (true ===
$stmt->
fetchColumn()) {