return array();
}
- function is_c_style_escapes() {
- return false;
- }
-
function show_status() {
return array();
}
}
}
+ function hasCStyleEscapes() {
+ static $c_style;
+ if ($c_style === null) {
+ $sql_mode = $this->_conn->result("SHOW VARIABLES LIKE 'sql_mode'", 1);
+ $c_style = (strpos($sql_mode, 'NO_BACKSLASH_ESCAPES') === false);
+ }
+ return $c_style;
+ }
+
}
return get_key_vals("SHOW VARIABLES");
}
- /** Check if C-style escapes are supported
- * @return bool
- */
- function is_c_style_escapes() {
- global $connection;
- static $c_style;
- if ($c_style === null) {
- $sql_mode = $connection->result("SHOW VARIABLES LIKE 'sql_mode'", 1);
- $c_style = (strpos($sql_mode, 'NO_BACKSLASH_ESCAPES') === false);
- }
- return $c_style;
- }
-
/** Get process list
* @return array [$row]
*/
}
return true;
}
+
+ function hasCStyleEscapes() {
+ return true;
+ }
+
}
return get_key_vals('SELECT name, display_value FROM v$parameter');
}
- function is_c_style_escapes() {
- return true;
- }
-
function process_list() {
return get_rows('SELECT sess.process AS "process", sess.username AS "user", sess.schemaname AS "schema", sess.status AS "status", sess.wait_class AS "wait_class", sess.seconds_in_wait AS "seconds_in_wait", sql.sql_text AS "sql_text", sess.machine AS "machine", sess.port AS "port"
FROM v$session sess LEFT OUTER JOIN v$sql sql
}
}
+ function hasCStyleEscapes() {
+ static $c_style;
+ if ($c_style === null) {
+ $c_style = ($this->_conn->result("SHOW standard_conforming_strings") == "off");
+ }
+ return $c_style;
+ }
+
}
return get_key_vals("SHOW ALL");
}
- function is_c_style_escapes() {
- global $connection;
- static $c_style;
- if ($c_style === null) {
- $c_style = ($connection->result("SHOW standard_conforming_strings") == "off");
- }
- return $c_style;
- }
-
function process_list() {
return get_rows("SELECT * FROM pg_stat_activity ORDER BY " . (min_version(9.2) ? "pid" : "procpid"));
}
return $return;
}
- function is_c_style_escapes() {
- return false;
- }
-
function show_status() {
$return = array();
foreach (get_vals("PRAGMA compile_options") as $option) {
function tableHelp($name) {
}
+ /** Check if C-style escapes are supported
+ * @return bool
+ */
+ function hasCStyleEscapes() {
+ return false;
+ }
+
}
$offset = $pos + strlen($found);
if ($found && rtrim($found) != $delimiter) { // find matching quote or comment end
- $c_style_escapes = is_c_style_escapes() || ($jush == "pgsql" && ($pos > 0 && strtolower($query[$pos - 1]) == "e"));
+ $c_style_escapes = $driver->hasCStyleEscapes() || ($jush == "pgsql" && ($pos > 0 && strtolower($query[$pos - 1]) == "e"));
$pattern = ($found == '/*' ? '\*/'
: ($found == '[' ? ']'