mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-31 13:09:21 +03:00
Predis to v2.2.2
This commit is contained in:
parent
9510347d3a
commit
969dca5f7e
449 changed files with 22013 additions and 2 deletions
|
|
@ -0,0 +1,40 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Predis package.
|
||||
*
|
||||
* (c) 2009-2020 Daniele Alessandri
|
||||
* (c) 2021-2023 Till Krüss
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Predis\Command\Redis\Search;
|
||||
|
||||
use Predis\Command\Command as RedisCommand;
|
||||
|
||||
/**
|
||||
* @see https://redis.io/commands/ft.aggregate/
|
||||
*
|
||||
* Run a search query on an index, and perform aggregate transformations
|
||||
* on the results, extracting statistics etc. from them
|
||||
*/
|
||||
class FTAGGREGATE extends RedisCommand
|
||||
{
|
||||
public function getId()
|
||||
{
|
||||
return 'FT.AGGREGATE';
|
||||
}
|
||||
|
||||
public function setArguments(array $arguments)
|
||||
{
|
||||
[$index, $query] = $arguments;
|
||||
$commandArguments = (!empty($arguments[2])) ? $arguments[2]->toArray() : [];
|
||||
|
||||
parent::setArguments(array_merge(
|
||||
[$index, $query],
|
||||
$commandArguments
|
||||
));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Predis package.
|
||||
*
|
||||
* (c) 2009-2020 Daniele Alessandri
|
||||
* (c) 2021-2023 Till Krüss
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Predis\Command\Redis\Search;
|
||||
|
||||
use Predis\Command\Command as RedisCommand;
|
||||
|
||||
/**
|
||||
* @see https://redis.io/commands/ft.aliasadd/
|
||||
*
|
||||
* Add an alias to an index.
|
||||
*/
|
||||
class FTALIASADD extends RedisCommand
|
||||
{
|
||||
public function getId()
|
||||
{
|
||||
return 'FT.ALIASADD';
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Predis package.
|
||||
*
|
||||
* (c) 2009-2020 Daniele Alessandri
|
||||
* (c) 2021-2023 Till Krüss
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Predis\Command\Redis\Search;
|
||||
|
||||
use Predis\Command\Command as RedisCommand;
|
||||
|
||||
/**
|
||||
* @see https://redis.io/commands/ft.aliasdel/
|
||||
*
|
||||
* Remove an alias from an index.
|
||||
*/
|
||||
class FTALIASDEL extends RedisCommand
|
||||
{
|
||||
public function getId()
|
||||
{
|
||||
return 'FT.ALIASDEL';
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Predis package.
|
||||
*
|
||||
* (c) 2009-2020 Daniele Alessandri
|
||||
* (c) 2021-2023 Till Krüss
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Predis\Command\Redis\Search;
|
||||
|
||||
use Predis\Command\Command as RedisCommand;
|
||||
|
||||
/**
|
||||
* @see https://redis.io/commands/ft.aliasupdate/
|
||||
*
|
||||
* Add an alias to an index. If the alias is already associated with another index,
|
||||
* FT.ALIASUPDATE removes the alias association with the previous index.
|
||||
*/
|
||||
class FTALIASUPDATE extends RedisCommand
|
||||
{
|
||||
public function getId()
|
||||
{
|
||||
return 'FT.ALIASUPDATE';
|
||||
}
|
||||
}
|
||||
42
plugins/cache-redis/Predis/Command/Redis/Search/FTALTER.php
Normal file
42
plugins/cache-redis/Predis/Command/Redis/Search/FTALTER.php
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Predis package.
|
||||
*
|
||||
* (c) 2009-2020 Daniele Alessandri
|
||||
* (c) 2021-2023 Till Krüss
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Predis\Command\Redis\Search;
|
||||
|
||||
use Predis\Command\Argument\Search\SchemaFields\FieldInterface;
|
||||
use Predis\Command\Command as RedisCommand;
|
||||
|
||||
class FTALTER extends RedisCommand
|
||||
{
|
||||
public function getId()
|
||||
{
|
||||
return 'FT.ALTER';
|
||||
}
|
||||
|
||||
public function setArguments(array $arguments)
|
||||
{
|
||||
[$index, $schema] = $arguments;
|
||||
$commandArguments = (!empty($arguments[2])) ? $arguments[2]->toArray() : [];
|
||||
|
||||
$schema = array_reduce($schema, static function (array $carry, FieldInterface $field) {
|
||||
return array_merge($carry, $field->toArray());
|
||||
}, []);
|
||||
|
||||
array_unshift($schema, 'SCHEMA', 'ADD');
|
||||
|
||||
parent::setArguments(array_merge(
|
||||
[$index],
|
||||
$commandArguments,
|
||||
$schema
|
||||
));
|
||||
}
|
||||
}
|
||||
30
plugins/cache-redis/Predis/Command/Redis/Search/FTCONFIG.php
Normal file
30
plugins/cache-redis/Predis/Command/Redis/Search/FTCONFIG.php
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Predis package.
|
||||
*
|
||||
* (c) 2009-2020 Daniele Alessandri
|
||||
* (c) 2021-2023 Till Krüss
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Predis\Command\Redis\Search;
|
||||
|
||||
use Predis\Command\Command as RedisCommand;
|
||||
|
||||
/**
|
||||
* @see https://redis.io/commands/ft.config-get/
|
||||
* @see https://redis.io/commands/ft.config-set/
|
||||
*
|
||||
* Container command corresponds to any FT.CONFIG *.
|
||||
* Represents any FUNCTION command with subcommand as first argument.
|
||||
*/
|
||||
class FTCONFIG extends RedisCommand
|
||||
{
|
||||
public function getId()
|
||||
{
|
||||
return 'FT.CONFIG';
|
||||
}
|
||||
}
|
||||
47
plugins/cache-redis/Predis/Command/Redis/Search/FTCREATE.php
Normal file
47
plugins/cache-redis/Predis/Command/Redis/Search/FTCREATE.php
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Predis package.
|
||||
*
|
||||
* (c) 2009-2020 Daniele Alessandri
|
||||
* (c) 2021-2023 Till Krüss
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Predis\Command\Redis\Search;
|
||||
|
||||
use Predis\Command\Argument\Search\SchemaFields\FieldInterface;
|
||||
use Predis\Command\Command as RedisCommand;
|
||||
|
||||
/**
|
||||
* @see https://redis.io/commands/ft.create/
|
||||
*
|
||||
* Create an index with the given specification
|
||||
*/
|
||||
class FTCREATE extends RedisCommand
|
||||
{
|
||||
public function getId()
|
||||
{
|
||||
return 'FT.CREATE';
|
||||
}
|
||||
|
||||
public function setArguments(array $arguments)
|
||||
{
|
||||
[$index, $schema] = $arguments;
|
||||
$commandArguments = (!empty($arguments[2])) ? $arguments[2]->toArray() : [];
|
||||
|
||||
$schema = array_reduce($schema, static function (array $carry, FieldInterface $field) {
|
||||
return array_merge($carry, $field->toArray());
|
||||
}, []);
|
||||
|
||||
array_unshift($schema, 'SCHEMA');
|
||||
|
||||
parent::setArguments(array_merge(
|
||||
[$index],
|
||||
$commandArguments,
|
||||
$schema
|
||||
));
|
||||
}
|
||||
}
|
||||
34
plugins/cache-redis/Predis/Command/Redis/Search/FTCURSOR.php
Normal file
34
plugins/cache-redis/Predis/Command/Redis/Search/FTCURSOR.php
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Predis package.
|
||||
*
|
||||
* (c) 2009-2020 Daniele Alessandri
|
||||
* (c) 2021-2023 Till Krüss
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Predis\Command\Redis\Search;
|
||||
|
||||
use Predis\Command\Command as RedisCommand;
|
||||
|
||||
class FTCURSOR extends RedisCommand
|
||||
{
|
||||
public function getId()
|
||||
{
|
||||
return 'FT.CURSOR';
|
||||
}
|
||||
|
||||
public function setArguments(array $arguments)
|
||||
{
|
||||
[$subcommand, $index, $cursorId] = $arguments;
|
||||
$commandArguments = (!empty($arguments[3])) ? $arguments[3]->toArray() : [];
|
||||
|
||||
parent::setArguments(array_merge(
|
||||
[$subcommand, $index, $cursorId],
|
||||
$commandArguments
|
||||
));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Predis package.
|
||||
*
|
||||
* (c) 2009-2020 Daniele Alessandri
|
||||
* (c) 2021-2023 Till Krüss
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Predis\Command\Redis\Search;
|
||||
|
||||
use Predis\Command\Command as RedisCommand;
|
||||
|
||||
/**
|
||||
* @see https://redis.io/commands/ft.dictadd/
|
||||
*
|
||||
* Add terms to a dictionary.
|
||||
*/
|
||||
class FTDICTADD extends RedisCommand
|
||||
{
|
||||
public function getId()
|
||||
{
|
||||
return 'FT.DICTADD';
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Predis package.
|
||||
*
|
||||
* (c) 2009-2020 Daniele Alessandri
|
||||
* (c) 2021-2023 Till Krüss
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Predis\Command\Redis\Search;
|
||||
|
||||
use Predis\Command\Command as RedisCommand;
|
||||
|
||||
/**
|
||||
* @see https://redis.io/commands/ft.dictdel/
|
||||
*
|
||||
* Delete terms from a dictionary.
|
||||
*/
|
||||
class FTDICTDEL extends RedisCommand
|
||||
{
|
||||
public function getId()
|
||||
{
|
||||
return 'FT.DICTDEL';
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Predis package.
|
||||
*
|
||||
* (c) 2009-2020 Daniele Alessandri
|
||||
* (c) 2021-2023 Till Krüss
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Predis\Command\Redis\Search;
|
||||
|
||||
use Predis\Command\Command as RedisCommand;
|
||||
|
||||
/**
|
||||
* @see https://redis.io/commands/ft.dictdump/
|
||||
*
|
||||
* Dump all terms in the given dictionary.
|
||||
*/
|
||||
class FTDICTDUMP extends RedisCommand
|
||||
{
|
||||
public function getId()
|
||||
{
|
||||
return 'FT.DICTDUMP';
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Predis package.
|
||||
*
|
||||
* (c) 2009-2020 Daniele Alessandri
|
||||
* (c) 2021-2023 Till Krüss
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Predis\Command\Redis\Search;
|
||||
|
||||
use Predis\Command\Command as RedisCommand;
|
||||
|
||||
class FTDROPINDEX extends RedisCommand
|
||||
{
|
||||
public function getId()
|
||||
{
|
||||
return 'FT.DROPINDEX';
|
||||
}
|
||||
|
||||
public function setArguments(array $arguments)
|
||||
{
|
||||
[$index] = $arguments;
|
||||
$commandArguments = [];
|
||||
|
||||
if (!empty($arguments[1])) {
|
||||
$commandArguments = $arguments[1]->toArray();
|
||||
}
|
||||
|
||||
parent::setArguments(array_merge(
|
||||
[$index],
|
||||
$commandArguments
|
||||
));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Predis package.
|
||||
*
|
||||
* (c) 2009-2020 Daniele Alessandri
|
||||
* (c) 2021-2023 Till Krüss
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Predis\Command\Redis\Search;
|
||||
|
||||
use Predis\Command\Command as RedisCommand;
|
||||
|
||||
/**
|
||||
* @see https://redis.io/commands/ft.explain/
|
||||
*
|
||||
* Return the execution plan for a complex query.
|
||||
*/
|
||||
class FTEXPLAIN extends RedisCommand
|
||||
{
|
||||
public function getId()
|
||||
{
|
||||
return 'FT.EXPLAIN';
|
||||
}
|
||||
|
||||
public function setArguments(array $arguments)
|
||||
{
|
||||
[$index, $query] = $arguments;
|
||||
$commandArguments = [];
|
||||
|
||||
if (!empty($arguments[2])) {
|
||||
$commandArguments = $arguments[2]->toArray();
|
||||
}
|
||||
|
||||
parent::setArguments(array_merge(
|
||||
[$index, $query],
|
||||
$commandArguments
|
||||
));
|
||||
}
|
||||
}
|
||||
28
plugins/cache-redis/Predis/Command/Redis/Search/FTINFO.php
Normal file
28
plugins/cache-redis/Predis/Command/Redis/Search/FTINFO.php
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Predis package.
|
||||
*
|
||||
* (c) 2009-2020 Daniele Alessandri
|
||||
* (c) 2021-2023 Till Krüss
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Predis\Command\Redis\Search;
|
||||
|
||||
use Predis\Command\Command as RedisCommand;
|
||||
|
||||
/**
|
||||
* @see https://redis.io/commands/ft.info/
|
||||
*
|
||||
* Return information and statistics on the index.
|
||||
*/
|
||||
class FTINFO extends RedisCommand
|
||||
{
|
||||
public function getId()
|
||||
{
|
||||
return 'FT.INFO';
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Predis package.
|
||||
*
|
||||
* (c) 2009-2020 Daniele Alessandri
|
||||
* (c) 2021-2023 Till Krüss
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Predis\Command\Redis\Search;
|
||||
|
||||
use Predis\Command\Command as RedisCommand;
|
||||
|
||||
/**
|
||||
* @see https://redis.io/commands/ft.profile/
|
||||
*
|
||||
* Perform a FT.SEARCH or FT.AGGREGATE command and collects performance information.
|
||||
*/
|
||||
class FTPROFILE extends RedisCommand
|
||||
{
|
||||
public function getId()
|
||||
{
|
||||
return 'FT.PROFILE';
|
||||
}
|
||||
|
||||
public function setArguments(array $arguments)
|
||||
{
|
||||
[$index, $arguments] = $arguments;
|
||||
|
||||
parent::setArguments(array_merge(
|
||||
[$index],
|
||||
$arguments->toArray()
|
||||
));
|
||||
}
|
||||
}
|
||||
39
plugins/cache-redis/Predis/Command/Redis/Search/FTSEARCH.php
Normal file
39
plugins/cache-redis/Predis/Command/Redis/Search/FTSEARCH.php
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Predis package.
|
||||
*
|
||||
* (c) 2009-2020 Daniele Alessandri
|
||||
* (c) 2021-2023 Till Krüss
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Predis\Command\Redis\Search;
|
||||
|
||||
use Predis\Command\Command as RedisCommand;
|
||||
|
||||
/**
|
||||
* @see https://redis.io/commands/ft.search/
|
||||
*
|
||||
* Search the index with a textual query, returning either documents or just ids
|
||||
*/
|
||||
class FTSEARCH extends RedisCommand
|
||||
{
|
||||
public function getId()
|
||||
{
|
||||
return 'FT.SEARCH';
|
||||
}
|
||||
|
||||
public function setArguments(array $arguments)
|
||||
{
|
||||
[$index, $query] = $arguments;
|
||||
$commandArguments = (!empty($arguments[2])) ? $arguments[2]->toArray() : [];
|
||||
|
||||
parent::setArguments(array_merge(
|
||||
[$index, $query],
|
||||
$commandArguments
|
||||
));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Predis package.
|
||||
*
|
||||
* (c) 2009-2020 Daniele Alessandri
|
||||
* (c) 2021-2023 Till Krüss
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Predis\Command\Redis\Search;
|
||||
|
||||
use Predis\Command\Command as RedisCommand;
|
||||
|
||||
class FTSPELLCHECK extends RedisCommand
|
||||
{
|
||||
public function getId()
|
||||
{
|
||||
return 'FT.SPELLCHECK';
|
||||
}
|
||||
|
||||
public function setArguments(array $arguments)
|
||||
{
|
||||
[$index, $query] = $arguments;
|
||||
$commandArguments = [];
|
||||
|
||||
if (!empty($arguments[2])) {
|
||||
$commandArguments = $arguments[2]->toArray();
|
||||
}
|
||||
|
||||
parent::setArguments(array_merge(
|
||||
[$index, $query],
|
||||
$commandArguments
|
||||
));
|
||||
}
|
||||
}
|
||||
39
plugins/cache-redis/Predis/Command/Redis/Search/FTSUGADD.php
Normal file
39
plugins/cache-redis/Predis/Command/Redis/Search/FTSUGADD.php
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Predis package.
|
||||
*
|
||||
* (c) 2009-2020 Daniele Alessandri
|
||||
* (c) 2021-2023 Till Krüss
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Predis\Command\Redis\Search;
|
||||
|
||||
use Predis\Command\Command as RedisCommand;
|
||||
|
||||
/**
|
||||
* @see https://redis.io/commands/ft.sugadd/
|
||||
*
|
||||
* Add a suggestion string to an auto-complete suggestion dictionary.
|
||||
*/
|
||||
class FTSUGADD extends RedisCommand
|
||||
{
|
||||
public function getId()
|
||||
{
|
||||
return 'FT.SUGADD';
|
||||
}
|
||||
|
||||
public function setArguments(array $arguments)
|
||||
{
|
||||
[$key, $string, $score] = $arguments;
|
||||
$commandArguments = (!empty($arguments[3])) ? $arguments[3]->toArray() : [];
|
||||
|
||||
parent::setArguments(array_merge(
|
||||
[$key, $string, $score],
|
||||
$commandArguments
|
||||
));
|
||||
}
|
||||
}
|
||||
28
plugins/cache-redis/Predis/Command/Redis/Search/FTSUGDEL.php
Normal file
28
plugins/cache-redis/Predis/Command/Redis/Search/FTSUGDEL.php
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Predis package.
|
||||
*
|
||||
* (c) 2009-2020 Daniele Alessandri
|
||||
* (c) 2021-2023 Till Krüss
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Predis\Command\Redis\Search;
|
||||
|
||||
use Predis\Command\Command as RedisCommand;
|
||||
|
||||
/**
|
||||
* @see https://redis.io/commands/ft.sugdel/
|
||||
*
|
||||
* Delete a string from a suggestion index.
|
||||
*/
|
||||
class FTSUGDEL extends RedisCommand
|
||||
{
|
||||
public function getId()
|
||||
{
|
||||
return 'FT.SUGDEL';
|
||||
}
|
||||
}
|
||||
39
plugins/cache-redis/Predis/Command/Redis/Search/FTSUGGET.php
Normal file
39
plugins/cache-redis/Predis/Command/Redis/Search/FTSUGGET.php
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Predis package.
|
||||
*
|
||||
* (c) 2009-2020 Daniele Alessandri
|
||||
* (c) 2021-2023 Till Krüss
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Predis\Command\Redis\Search;
|
||||
|
||||
use Predis\Command\Command as RedisCommand;
|
||||
|
||||
/**
|
||||
* @see https://redis.io/commands/ft.sugget/
|
||||
*
|
||||
* Get completion suggestions for a prefix.
|
||||
*/
|
||||
class FTSUGGET extends RedisCommand
|
||||
{
|
||||
public function getId()
|
||||
{
|
||||
return 'FT.SUGGET';
|
||||
}
|
||||
|
||||
public function setArguments(array $arguments)
|
||||
{
|
||||
[$key, $prefix] = $arguments;
|
||||
$commandArguments = (!empty($arguments[2])) ? $arguments[2]->toArray() : [];
|
||||
|
||||
parent::setArguments(array_merge(
|
||||
[$key, $prefix],
|
||||
$commandArguments
|
||||
));
|
||||
}
|
||||
}
|
||||
28
plugins/cache-redis/Predis/Command/Redis/Search/FTSUGLEN.php
Normal file
28
plugins/cache-redis/Predis/Command/Redis/Search/FTSUGLEN.php
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Predis package.
|
||||
*
|
||||
* (c) 2009-2020 Daniele Alessandri
|
||||
* (c) 2021-2023 Till Krüss
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Predis\Command\Redis\Search;
|
||||
|
||||
use Predis\Command\Command as RedisCommand;
|
||||
|
||||
/**
|
||||
* @see https://redis.io/commands/ft.suglen/
|
||||
*
|
||||
* Get the size of an auto-complete suggestion dictionary.
|
||||
*/
|
||||
class FTSUGLEN extends RedisCommand
|
||||
{
|
||||
public function getId()
|
||||
{
|
||||
return 'FT.SUGLEN';
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Predis package.
|
||||
*
|
||||
* (c) 2009-2020 Daniele Alessandri
|
||||
* (c) 2021-2023 Till Krüss
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Predis\Command\Redis\Search;
|
||||
|
||||
use Predis\Command\Command as RedisCommand;
|
||||
|
||||
/**
|
||||
* @see https://redis.io/commands/ft.syndump/
|
||||
*
|
||||
* Dump the contents of a synonym group.
|
||||
*/
|
||||
class FTSYNDUMP extends RedisCommand
|
||||
{
|
||||
public function getId()
|
||||
{
|
||||
return 'FT.SYNDUMP';
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Predis package.
|
||||
*
|
||||
* (c) 2009-2020 Daniele Alessandri
|
||||
* (c) 2021-2023 Till Krüss
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Predis\Command\Redis\Search;
|
||||
|
||||
use Predis\Command\Command as RedisCommand;
|
||||
|
||||
/**
|
||||
* @see https://redis.io/commands/ft.synupdate/
|
||||
*
|
||||
* Update a synonym group
|
||||
*/
|
||||
class FTSYNUPDATE extends RedisCommand
|
||||
{
|
||||
public function getId()
|
||||
{
|
||||
return 'FT.SYNUPDATE';
|
||||
}
|
||||
|
||||
public function setArguments(array $arguments)
|
||||
{
|
||||
[$index, $synonymGroupId] = $arguments;
|
||||
$commandArguments = [];
|
||||
|
||||
if (!empty($arguments[2])) {
|
||||
$commandArguments = $arguments[2]->toArray();
|
||||
}
|
||||
|
||||
$terms = array_slice($arguments, 3);
|
||||
|
||||
parent::setArguments(array_merge(
|
||||
[$index, $synonymGroupId],
|
||||
$commandArguments,
|
||||
$terms
|
||||
));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Predis package.
|
||||
*
|
||||
* (c) 2009-2020 Daniele Alessandri
|
||||
* (c) 2021-2023 Till Krüss
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Predis\Command\Redis\Search;
|
||||
|
||||
use Predis\Command\Command as RedisCommand;
|
||||
|
||||
/**
|
||||
* @see https://redis.io/commands/ft.tagvals/
|
||||
*
|
||||
* Return a distinct set of values indexed in a Tag field.
|
||||
*/
|
||||
class FTTAGVALS extends RedisCommand
|
||||
{
|
||||
public function getId()
|
||||
{
|
||||
return 'FT.TAGVALS';
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue