Are source commands available in StackExchange.Redis?

Is there any functionality in StackExchange.Redis that allows you to execute raw commands directly? As I would provide a string using a command, for example. (hypothetical code below):

conn.Send("ZADD mysortedset 1 john"); 

I know that there are methods available only for each command, including ZADD , but this is not the point.

+5
source share
1 answer

The introduction of β€œmodules” has made this much more relevant; this API now exists in Execute(...) . See: http://blog.marcgravell.com/2017/04/stackexchangeredis-and-redis-40-modules.html


Earlier:

Currently, I have no doubt about that. In particular, the implementation of this will not allow correct routing on fragments (twemproxy, redis-cluster, etc.), It will not allow renaming the use of a command card and will not allow the use of binary keys / values. It would also allow the use of very risky and conceptual commands, such as select , watch / multi / exec , which block brpop / blpop / brpoplpush - all of which would be disastrous for the multiplexer (well, select not biggie, since it can just set it so that Send leaves db undefined - code that already exists thanks to some similar examples), It also issues dangerous commands that should never be used from a shared library: debug segfault , client pause , etc. - again, all very bad ideas.

But, of course, theoretically this could be done ... but I really would like to find a good reason to compensate for the many problems above.

Currently, the most open way to execute ad-hoc commands - through ScriptEvaluate - is of course to be a Lua entry.

+7
source

Source: https://habr.com/ru/post/1215441/


All Articles