All api’s are also available on the built in RESP interface without the B. prefix.
Api’s with the same signature as VALKEY or REDIS works the same
B.ADD K V add a key and value moreB.SET K V set a key overriding existing value moreB.GET K retrieve a key, returns nil if no key exists moreB.REM K removes a key, returns value if success moreB.MAX returns largest key (or nil) - numbers are less than textB.MIN returns smallest key (or nil) if there are no keysB.RANGE K1 K2 count returns an array of maximum count containing the keys see exampleB.COUNT K1 K2 returns count of keys within a range see exampleB.LB K1 lower bound: first key not less than K1B.SIZE returns keys held by BARCH this may include expired or evicted volatile keysB.HEAPBYTES bytes allocated by BARCH aloneB.STATS lots of statistics on internal datastructures, node count, defrag, pages etc.B.OPS operation counts of various BARCH api commandsB.KEYS scan keys with a glob pattern without blocking other calls moreB.VALUES scan values with a glob pattern without blocking other calls moreACL and AUTH moreB.FIRST or B.LB the lower bound or first key not less than the inputB.NEXT or B.UB the upper bound or next key larger than the input- Use `SET CONFIG compression zstd` (port 14000) or `SET CONFIG B.compression zstd` on the valkey port
- You can use `valkey-server --port 7777 --loadmodule _barch.so` which will put valkey on port 7777 and barch on port 14000
- Use `TRAIN "SOME DATA"` to add samples for training the dictionary, should be at least five (5)
- See test/test_data.py for generating some training data - training isn't required though you can just enable compression
- Use `TRAIN` (no parameters) to complete training and save the trained dictionary - this is used to compress all data
- If training data does not exist barch will use the values as training data and save a dictionary automatically
MIN MAX
SIZE SAVE
PUBLISH LB, FIRST
START STOP
RETRIEVE LOAD
ADDROUTE ROUTE
REMROUTE OPS
STATS UB, NEXT
COUNT SPACE
USE
AUTH ACL
SET KEYS
INCR INCRBY
UINCRBY UDECRBY
DECR DECRBY
MSET DEL
GET MGET
REM FLUSHDB/FLUSHALL
PING TTL
EXPIRE EXISTS
DBSIZE MULTI
EXEC CLIENT INFO
INFO APPEND
KEYS VALUES
SELECT
HSET HEXPIREAT
HEXPIRE HMGET
HINCRBY HINCRBYFLOAT
HDEL HGETDEL
HTTL HGET
HLEN HEXPIRETIME
HGETALL HKEYS
HEXISTS
ZADD ZREM
ZINCRBY ZRANGE
ZCARD ZDIFF
ZDIFFSTORE ZINTERSTORE
ZINTERCARD ZINTER
ZPOPMIN ZPOPMAX
ZREVRANGE ZRANGEBYSCORE
ZREVRANGEBYSCORE ZREMRANGEBYLEX
ZRANGEBYLEX ZREVRANGEBYLEX
ZRANK
LLEN LPUSH
LPOP BLPOP
BRPOP LFRONT
LBACK