Subversion Repositories oidplus

Rev

Rev 788 | Rev 1086 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 788 Rev 1050
Line 15... Line 15...
15
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
 * See the License for the specific language governing permissions and
16
 * See the License for the specific language governing permissions and
17
 * limitations under the License.
17
 * limitations under the License.
18
 */
18
 */
19
 
19
 
20
if (!defined('INSIDE_OIDPLUS')) die();
20
namespace ViaThinkSoft\OIDplus;
21
 
21
 
22
class OIDplusSqlSlangPluginOracle extends OIDplusSqlSlangPlugin {
22
class OIDplusSqlSlangPluginOracle extends OIDplusSqlSlangPlugin {
23
 
23
 
24
        public static function id(): string {
24
        public static function id(): string {
25
                return 'oracle';
25
                return 'oracle';
Line 63... Line 63...
63
        public function detect(OIDplusDatabaseConnection $db): bool {
63
        public function detect(OIDplusDatabaseConnection $db): bool {
64
                try {
64
                try {
65
                        $vers = $db->query("SELECT banner FROM v\$version WHERE banner LIKE 'Oracle%'")->fetch_object()->banner;
65
                        $vers = $db->query("SELECT banner FROM v\$version WHERE banner LIKE 'Oracle%'")->fetch_object()->banner;
66
                        $vers = strtolower($vers);
66
                        $vers = strtolower($vers);
67
                        return (strpos($vers, 'oracle') !== false);
67
                        return (strpos($vers, 'oracle') !== false);
68
                } catch (Exception $e) {
68
                } catch (\Exception $e) {
69
                        return false;
69
                        return false;
70
                }
70
                }
71
        }
71
        }
72
 
72
 
73
        private $last_insert_table = null;
73
        private $last_insert_table = null;