Commit d2cb245d by Qiang Xue

Finished sphinx support

parent e67d0b3c
...@@ -191,7 +191,7 @@ class Command extends \yii\db\Command ...@@ -191,7 +191,7 @@ class Command extends \yii\db\Command
* @param string $index the name of the index from which to take the text processing settings * @param string $index the name of the index from which to take the text processing settings
* @param string $text the text to break down to keywords. * @param string $text the text to break down to keywords.
* @param boolean $fetchStatistic whether to return document and hit occurrence statistics * @param boolean $fetchStatistic whether to return document and hit occurrence statistics
* @return string the SQL statement for call keywords. * @return static the command object itself
*/ */
public function callKeywords($index, $text, $fetchStatistic = false) public function callKeywords($index, $text, $fetchStatistic = false)
{ {
......
...@@ -109,7 +109,6 @@ class Connection extends \yii\db\Connection ...@@ -109,7 +109,6 @@ class Connection extends \yii\db\Connection
*/ */
public function createCommand($sql = null, $params = []) public function createCommand($sql = null, $params = [])
{ {
$this->open();
$command = new Command([ $command = new Command([
'db' => $this, 'db' => $this,
'sql' => $sql, 'sql' => $sql,
......
...@@ -323,12 +323,11 @@ class Schema extends Object ...@@ -323,12 +323,11 @@ class Schema extends Object
*/ */
public function quoteValue($str) public function quoteValue($str)
{ {
if (!is_string($str)) { if (is_string($str)) {
return $this->db->getReadPdo()->quote($str);
} else {
return $str; return $str;
} }
$this->db->open();
return $this->db->pdo->quote($str);
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment