small fixes for transaction drivers
This commit is contained in:
parent
4a7487567d
commit
98c1f66b64
2 changed files with 4 additions and 4 deletions
|
@ -106,7 +106,7 @@ class Doctrine_Transaction_Firebird extends Doctrine_Transaction {
|
||||||
switch ($options['wait']) {
|
switch ($options['wait']) {
|
||||||
case 'WAIT':
|
case 'WAIT':
|
||||||
case 'NO WAIT':
|
case 'NO WAIT':
|
||||||
$wait = $options['wait'];
|
$wait = ' ' . $options['wait'];
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new Doctrine_Transaction_Exception('wait option is not supported: ' . $options['wait']);
|
throw new Doctrine_Transaction_Exception('wait option is not supported: ' . $options['wait']);
|
||||||
|
@ -117,14 +117,14 @@ class Doctrine_Transaction_Firebird extends Doctrine_Transaction {
|
||||||
switch ($options['rw']) {
|
switch ($options['rw']) {
|
||||||
case 'READ ONLY':
|
case 'READ ONLY':
|
||||||
case 'READ WRITE':
|
case 'READ WRITE':
|
||||||
$rw = $options['wait'];
|
$rw = ' ' . $options['wait'];
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new Doctrine_Transaction_Exception('wait option is not supported: ' . $options['rw']);
|
throw new Doctrine_Transaction_Exception('wait option is not supported: ' . $options['rw']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$query = 'SET TRANSACTION ' . $rw . ' ' . $wait .' ISOLATION LEVEL ' . $nativeIsolation;
|
$query = 'SET TRANSACTION' . $rw . $wait .' ISOLATION LEVEL ' . $nativeIsolation;
|
||||||
|
|
||||||
$this->conn->getDbh()->query($query);
|
$this->conn->getDbh()->query($query);
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,6 +93,6 @@ class Doctrine_Transaction_Oracle extends Doctrine_Transaction {
|
||||||
}
|
}
|
||||||
|
|
||||||
$query = 'ALTER SESSION ISOLATION LEVEL ' . $isolation;
|
$query = 'ALTER SESSION ISOLATION LEVEL ' . $isolation;
|
||||||
return $this->dbh->query($query);
|
return $this->conn->getDbh()->query($query);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue