mirror of
https://github.com/dg/dibi.git
synced 2025-08-04 13:17:58 +02:00
Oracle: adds support for login schema option
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
* - username (or user)
|
||||
* - password (or pass)
|
||||
* - charset => character encoding to set
|
||||
* - schema => alters session schema
|
||||
* - formatDate => how to format date in SQL (@see date)
|
||||
* - formatDateTime => how to format datetime in SQL (@see date)
|
||||
* - resource (resource) => existing connection resource
|
||||
@@ -75,6 +76,10 @@ class DibiOracleDriver extends DibiObject implements IDibiDriver, IDibiResultDri
|
||||
$err = oci_error();
|
||||
throw new DibiDriverException($err['message'], $err['code']);
|
||||
}
|
||||
|
||||
if (isset($config['schema'])) {
|
||||
$this->query('ALTER SESSION SET CURRENT_SCHEMA=' . $config['schema']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user