85 if($leftOrRight ===
'left')
129 if(is_string($value))
131 return $value = str_replace(
"'",
"''", $value);
145 return $this->table_prefix . $name;
170 return $this->
escape($column_name);
174 list($table, $column) = explode(
'.', $column_name);
176 return $this->
escape($table) .
'.' . $this->
escape($column);
192 if(strpos($column_name,
'.') === FALSE && strpos($column_name,
'(') === FALSE)
210 if(strpos($column_name,
'.') !== FALSE && strpos($column_name,
'(') === FALSE)
237 $functions = preg_split(
'/([\+\-\*\/\ ])/', $column_name, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
238 foreach($functions as $k => $v)
240 $function = &$functions[$k];
241 if(strlen($function) == 1)
245 $pos = strrpos(
"(", $function);
246 $matches = preg_split(
'/([a-zA-Z0-9_*]+)/', $function, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
247 $total_brackets = substr_count($function,
"(");
249 foreach($matches as $i => $j)
251 $match = &$matches[$i];
257 if(strpos($match,
')') !== FALSE)
261 if(in_array($match, array(
',',
'.')))
265 if($brackets == $total_brackets)
267 if(!is_numeric($match) && !in_array(strtoupper($match), array(
'UNSIGNED',
'INTEGER',
'AS')))
273 $function = implode(
'', $matches);
275 return implode(
'', $functions);
286 if(substr($column_name, -1) ==
'*')
302 if(strpos($column_name,
"(*)") !== FALSE)
316 if($this->
isStar($column_name))
324 if(stripos($column_name,
'distinct') !== FALSE)
isUnqualifiedColumnName($column_name)
getEscapeChar($leftOrRight)
isStarFunction($column_name)
escapeStringValue($value)
parseExpression($column_name)
isQualifiedColumnName($column_name)
escapeColumn($column_name)
__construct($escape_char_left, $escape_char_right="", $table_prefix="xe_")
escapeColumnExpression($column_name)