mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 07:12:47 +08:00
改进Model类和Query类 name方法纳入链式操作 查询完成后释放 原来Connection类的getTableInfo方法移入 Query类
This commit is contained in:
@@ -79,7 +79,7 @@ abstract class Builder
|
||||
}
|
||||
|
||||
// 获取绑定信息
|
||||
$bind = $this->connection->getTableInfo($options['table'], 'bind');
|
||||
$bind = $this->query->getTableInfo($options['table'], 'bind');
|
||||
if ('*' == $options['field']) {
|
||||
$fields = array_keys($bind);
|
||||
} else {
|
||||
@@ -223,8 +223,8 @@ abstract class Builder
|
||||
|
||||
$whereStr = '';
|
||||
// 获取字段信息
|
||||
$fields = $this->connection->getTableInfo($table, 'fields');
|
||||
$binds = $this->connection->getTableInfo($table, 'bind');
|
||||
$fields = $this->query->getTableInfo($table, 'fields');
|
||||
$binds = $this->query->getTableInfo($table, 'bind');
|
||||
foreach ($where as $key => $val) {
|
||||
$str = [];
|
||||
foreach ($val as $field => $value) {
|
||||
@@ -564,7 +564,7 @@ abstract class Builder
|
||||
{
|
||||
// 获取合法的字段
|
||||
if ('*' == $options['field']) {
|
||||
$fields = $this->connection->getTableInfo($options['table'], 'fields');
|
||||
$fields = $this->query->getTableInfo($options['table'], 'fields');
|
||||
} else {
|
||||
$fields = is_array($options['field']) ? $options['field'] : explode(',', $options['field']);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user