Skip to content

Commit

Permalink
1.8
Browse files Browse the repository at this point in the history
* [+] showMeta moved to SphinxToolkitHelper
  • Loading branch information
KarelWintersky committed Nov 7, 2020
1 parent 805af9b commit 3c9f7a7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
8 changes: 0 additions & 8 deletions interfaces/SphinxToolkitFoolzInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,4 @@ public static function rt_RebuildAbstractIndex(PDO $pdo_connection, string $sql_
*/
public static function getInstance($connection);

/**
* Возвращает META-информацию (после запроса)
*
* @throws ConnectionException
* @throws DatabaseException
* @throws SphinxQLException
*/
public static function showMeta();
}
5 changes: 0 additions & 5 deletions src/SphinxToolkit.php
Original file line number Diff line number Diff line change
Expand Up @@ -523,11 +523,6 @@ public static function rt_RebuildAbstractIndex(PDO $pdo_connection, string $sql_
return $total_updated;
}

public static function showMeta()
{
return (new Helper(self::$spql_connection))->showMeta()->execute()->fetchAllAssoc();
}

/**
*
* @param string $index_name
Expand Down
14 changes: 14 additions & 0 deletions traits/SphinxToolkitHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

namespace Arris\Toolkit;

use Foolz\SphinxQL\Drivers\ConnectionInterface;
use Foolz\SphinxQL\Helper;
use PDO;

/**
Expand Down Expand Up @@ -233,4 +235,16 @@ public static function EmulateBuildExcerpts($source, $needle, $options)
return $target;
} // EmulateBuildExcerpts

/**
*
* @param ConnectionInterface $connection
* @throws \Foolz\SphinxQL\Exception\ConnectionException
* @throws \Foolz\SphinxQL\Exception\DatabaseException
* @throws \Foolz\SphinxQL\Exception\SphinxQLException
*/
public static function showMeta(ConnectionInterface $connection)
{
(new Helper($connection))->showMeta()->execute()->fetchAllAssoc();
}

}

0 comments on commit 3c9f7a7

Please sign in to comment.