内核更新

This commit is contained in:
2017-03-16 12:03:34 +08:00
parent b355535009
commit a4d58f9f09
28 changed files with 438 additions and 217 deletions
+3 -2
View File
@@ -36,10 +36,11 @@ class Mysql extends Builder
$key = 'json_extract(' . $field . ', \'$.' . $name . '\')';
} elseif (strpos($key, '.') && !preg_match('/[,\'\"\(\)`\s]/', $key)) {
list($table, $key) = explode('.', $key, 2);
if ('__TABLE__' == $table) {
$table = $this->query->getTable();
}
if (isset($options['alias'][$table])) {
$table = $options['alias'][$table];
} elseif ('__TABLE__' == $table) {
$table = $this->query->getTable();
}
}
if (!preg_match('/[,\'\"\*\(\)`.\s]/', $key)) {
+3 -2
View File
@@ -55,10 +55,11 @@ class Pgsql extends Builder
$key = $field . '->>\'' . $name . '\'';
} elseif (strpos($key, '.')) {
list($table, $key) = explode('.', $key, 2);
if ('__TABLE__' == $table) {
$table = $this->query->getTable();
}
if (isset($options['alias'][$table])) {
$table = $options['alias'][$table];
} elseif ('__TABLE__' == $table) {
$table = $this->query->getTable();
}
}
if (isset($table)) {
+3 -2
View File
@@ -60,10 +60,11 @@ class Sqlite extends Builder
$key = trim($key);
if (strpos($key, '.')) {
list($table, $key) = explode('.', $key, 2);
if ('__TABLE__' == $table) {
$table = $this->query->getTable();
}
if (isset($options['alias'][$table])) {
$table = $options['alias'][$table];
} elseif ('__TABLE__' == $table) {
$table = $this->query->getTable();
}
}
if (isset($table)) {
+3 -2
View File
@@ -73,10 +73,11 @@ class Sqlsrv extends Builder
$key = trim($key);
if (strpos($key, '.') && !preg_match('/[,\'\"\(\)\[\s]/', $key)) {
list($table, $key) = explode('.', $key, 2);
if ('__TABLE__' == $table) {
$table = $this->query->getTable();
}
if (isset($options['alias'][$table])) {
$table = $options['alias'][$table];
} elseif ('__TABLE__' == $table) {
$table = $this->query->getTable();
}
}
if (!is_numeric($key) && !preg_match('/[,\'\"\*\(\)\[.\s]/', $key)) {