升级到v5128lts

This commit is contained in:
cxdbz committed 2018-11-28 22:00:19 +08:00
1 parent a139519dec
commit dbefa7f320
30 files changed
+184 -117

No files matched your search

+13 -19
View File
@@ -174,9 +174,9 @@ abstract class Builder
return $data->getValue();
}
$query->bind($data, isset($bind[$key]) ? $bind[$key] : PDO::PARAM_STR);
$name = $query->bind($data, isset($bind[$key]) ? $bind[$key] : PDO::PARAM_STR);
return '?';
return ':' . $name;
}
/**
@@ -411,8 +411,8 @@ abstract class Builder
}
if (is_scalar($value) && !in_array($exp, ['EXP', 'NOT NULL', 'NULL', 'IN', 'NOT IN', 'BETWEEN', 'NOT BETWEEN']) && strpos($exp, 'TIME') === false) {
$query->bind($value, $bindType);
$value = '?';
$name = $query->bind($value, $bindType);
$value = ':' . $name;
}
// 解析查询表达式
@@ -447,12 +447,10 @@ abstract class Builder
// 模糊匹配
if (is_array($value)) {
foreach ($value as $item) {
$bind[] = [$item, $bindType];
$array[] = $key . ' ' . $exp . ' ?';
$name = $query->bind($item, $bindType);
$array[] = $key . ' ' . $exp . ' :' . $name;
}
$query->bind($bind);
$whereStr = '(' . implode($array, ' ' . strtoupper($logic) . ' ') . ')';
} else {
$whereStr = $key . ' ' . $exp . ' ' . $value;
@@ -534,12 +532,10 @@ abstract class Builder
// BETWEEN 查询
$data = is_array($value) ? $value : explode(',', $value);
$bind[] = [$data[0], $bindType];
$bind[] = [$data[1], $bindType];
$min = $query->bind($data[0], $bindType);
$max = $query->bind($data[1], $bindType);
$query->bind($bind);
return $key . ' ' . $exp . ' ? AND ? ';
return $key . ' ' . $exp . ' :' . $min . ' AND :' . $max . ' ';
}
/**
@@ -651,16 +647,14 @@ abstract class Builder
} else {
$value = array_unique(is_array($value) ? $value : explode(',', $value));
$bind = [];
$array = [];
foreach ($value as $k => $v) {
$bind[] = [$v, $bindType];
$array[] = '?';
$name = $query->bind($v, $bindType);
$array[] = ':' . $name;
}
$zone = implode(',', $array);
$query->bind($bind);
$value = empty($zone) ? "''" : $zone;
}
@@ -728,9 +722,9 @@ abstract class Builder
}
}
$query->bind($value, $bindType);
$name = $query->bind($value, $bindType);
return '?';
return ':' . $name;
}
/**