1 /*
2  * Hunt - A redis client library for D programming language.
3  *
4  * Copyright (C) 2018-2019 HuntLabs
5  *
6  * Website: https://www.huntlabs.net/
7  *
8  * Licensed under the Apache-2.0 License.
9  *
10  */
11  
12 module hunt.redis.commands.MultiKeyBinaryRedisPipeline;
13 
14 import hunt.redis.BitOP;
15 import hunt.redis.Response;
16 import hunt.redis.SortingParams;
17 import hunt.redis.ZParams;
18 import hunt.redis.params.MigrateParams;
19 
20 import hunt.collection.List;
21 import hunt.collection.Set;
22 import hunt.Long;
23 
24 /**
25  * Multikey related commands (these are split out because they are non-shardable)
26  */
27 interface MultiKeyBinaryRedisPipeline {
28 
29   Response!(Long) del(const(ubyte)[][] keys...);
30 
31   Response!(Long) unlink(const(ubyte)[][] keys...);
32 
33   Response!(Long) exists(const(ubyte)[][] keys...);
34 
35   Response!(List!(const(ubyte)[])) blpop(const(ubyte)[][] args...);
36 
37   Response!(List!(const(ubyte)[])) brpop(const(ubyte)[][] args...);
38 
39   Response!(Set!(const(ubyte)[])) keys(const(ubyte)[] pattern);
40 
41   Response!(List!(const(ubyte)[])) mget(const(ubyte)[][] keys...);
42 
43   Response!(string) mset(const(ubyte)[][] keysvalues...);
44 
45   Response!(Long) msetnx(const(ubyte)[][] keysvalues...);
46 
47   Response!(string) rename(const(ubyte)[] oldkey, const(ubyte)[] newkey);
48 
49   Response!(Long) renamenx(const(ubyte)[] oldkey, const(ubyte)[] newkey);
50 
51   Response!(const(ubyte)[]) rpoplpush(const(ubyte)[] srckey, const(ubyte)[] dstkey);
52 
53   Response!(Set!(const(ubyte)[])) sdiff(const(ubyte)[][] keys...);
54 
55   Response!(Long) sdiffstore(const(ubyte)[] dstkey, const(ubyte)[][] keys...);
56 
57   Response!(Set!(const(ubyte)[])) sinter(const(ubyte)[][] keys...);
58 
59   Response!(Long) sinterstore(const(ubyte)[] dstkey, const(ubyte)[][] keys...);
60 
61   Response!(Long) smove(const(ubyte)[] srckey, const(ubyte)[] dstkey, const(ubyte)[] member);
62 
63   Response!(Long) sort(const(ubyte)[] key, SortingParams sortingParameters, const(ubyte)[] dstkey);
64 
65   Response!(Long) sort(const(ubyte)[] key, const(ubyte)[] dstkey);
66 
67   Response!(Set!(const(ubyte)[])) sunion(const(ubyte)[][] keys...);
68 
69   Response!(Long) sunionstore(const(ubyte)[] dstkey, const(ubyte)[][] keys...);
70 
71   Response!(string) watch(const(ubyte)[][] keys...);
72 
73   Response!(Long) zinterstore(const(ubyte)[] dstkey, const(ubyte)[][] sets...);
74 
75   Response!(Long) zinterstore(const(ubyte)[] dstkey, ZParams params, const(ubyte)[][] sets...);
76 
77   Response!(Long) zunionstore(const(ubyte)[] dstkey, const(ubyte)[][] sets...);
78 
79   Response!(Long) zunionstore(const(ubyte)[] dstkey, ZParams params, const(ubyte)[][] sets...);
80 
81   Response!(const(ubyte)[]) brpoplpush(const(ubyte)[] source, const(ubyte)[] destination, int timeout);
82 
83   Response!(Long) publish(const(ubyte)[] channel, const(ubyte)[] message);
84 
85   Response!(const(ubyte)[]) randomKeyBinary();
86 
87   Response!(Long) bitop(BitOP op, const(ubyte)[] destKey, const(ubyte)[][] srcKeys...);
88 
89   Response!(string) pfmerge(const(ubyte)[] destkey, const(ubyte)[][] sourcekeys...);
90 
91   Response!(Long) pfcount(const(ubyte)[][] keys...);
92 
93   Response!(Long) touch(const(ubyte)[][] keys...);
94 
95   Response!(string) migrate(string host, int port, int destinationDB, int timeout, MigrateParams params, const(ubyte)[][] keys...);
96 }