private function makeSql($inputSql, $factors = null, SqlCompiler $aSqlCompiler = null) { if (is_string($inputSql)) { $aSql = SQL::make($inputSql, $factors); } else { if ($inputSql instanceof SQL) { $aSql = $inputSql; if ($factors) { $aSql->addFactors($factors); } } else { throw new ExecuteException($this, null, 0, "DB::query() 输入的参数 \$sql 类型无效。"); } } if ($aSql) { return $aSql->toString($aSqlCompiler); } else { return $inputSql; } }