改进驱动的parseKey方法

This commit is contained in:
thinkphp
2018-04-27 15:38:45 +08:00
parent 48054a6abb
commit f4301c8667
4 changed files with 23 additions and 6 deletions

View File

@@ -52,12 +52,18 @@ class Sqlite extends Builder
/**
* 字段和表名处理
* @access protected
* @param string $key
* @param mixed $key
* @param array $options
* @return string
*/
protected function parseKey($key, $options = [], $strict = false)
{
if (is_numeric($key)) {
return $key;
} elseif ($key instanceof Expression) {
return $key->getValue();
}
$key = trim($key);
if (strpos($key, '.')) {
list($table, $key) = explode('.', $key, 2);