Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Add support for changing the default schema when connecting to Oracle. #1278

Merged
merged 1 commit into from

2 participants

@pasamio

This pull request adds support for changing the default schema when connecting to an Oracle database. This is useful for when the user connecting isn't the same user as the desired schema where the Oracle tables are being stored. This adds a new schema option to the supported options for Oracle. Schema is similar to database name in other systems however as Oracle treats database names differently when connecting this is a distinct option.

@LouisLandry LouisLandry merged commit deeff62 into joomla:staging
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 5 additions and 0 deletions.
  1. +5 −0 libraries/joomla/database/driver/oracle.php
View
5 libraries/joomla/database/driver/oracle.php
@@ -102,6 +102,11 @@ public function connect()
parent::connect();
+ if (isset($this->options['schema']))
+ {
+ $this->setQuery('ALTER SESSION SET CURRENT_SCHEMA = ' . $this->quoteName($this->options['schema']))->execute();
+ }
+
$this->setDateFormat($this->dateformat);
}
Something went wrong with that request. Please try again.