18 String/bytes Commands
All Redis strings are sequences of bytes, so whereas most of the following functions accept both bytes? and string? values, when a key is retrieved from the server, its value will always be either #f (if it doesn’t exist) or bytes?.
procedure
(redis-bytes-append! client key value)
→ exact-nonnegative-integer? client : redis? key : redis-key/c value : redis-string/c
procedure
(redis-bytes-bitcount client key [ #:start start #:stop stop]) → exact-nonnegative-integer? client : redis? key : redis-key/c start : exact-integer? = 0 stop : exact-integer? = -1
procedure
(redis-bytes-bitwise-and! client dst src ...)
→ exact-nonnegative-integer? client : redis? dst : redis-key/c src : redis-key/c
procedure
(redis-bytes-bitwise-not! client src [dst])
→ exact-nonnegative-integer? client : redis? src : redis-key/c dst : redis-key/c = src
procedure
(redis-bytes-bitwise-or! client dst src ...)
→ exact-nonnegative-integer? client : redis? dst : redis-key/c src : redis-key/c
procedure
(redis-bytes-bitwise-xor! client dst src ...)
→ exact-nonnegative-integer? client : redis? dst : redis-key/c src : redis-key/c
procedure
(redis-bytes-copy! client key offset value)
→ exact-nonnegative-integer? client : redis? key : redis-key/c offset : exact-nonnegative-integer? value : redis-string/c
procedure
(redis-bytes-decr! client key [amt]) → exact-integer?
client : redis? key : redis-key/c amt : exact-integer? = 1
procedure
(redis-bytes-get client key ...+) → (or/c #f bytes?)
client : redis? key : redis-key/c
procedure
(redis-bytes-incr! client key amt) → real?
client : redis? key : redis-key/c amt : real?
procedure
(redis-bytes-length client key) → exact-nonnegative-integer?
client : redis? key : redis-key/c
procedure
(redis-bytes-ref/bit client key offset) → (or/c 0 1)
client : redis? key : redis-key/c offset : exact-nonnegative-integer?
procedure
(redis-bytes-set! client key value [ #:expires-in expires-in #:unless-exists? unless-exists? #:when-exists? when-exists?]) → boolean? client : redis? key : redis-key/c value : redis-string/c expires-in : (or/c #f exact-nonnegative-integer?) = #f unless-exists? : boolean? = #f when-exists? : boolean? = #f
When expires-in is #t, then the key will expire after expires-in milliseconds.
When unless-exists? is #t, then the key will only be set if it doesn’t already exist.
procedure
(redis-bytes-set/bit! client key offset value) → (or/c 0 1) client : redis? key : redis-key/c offset : exact-nonnegative-integer? value : (or/c 0 1)
procedure
(redis-subbytes client key [ #:start start #:stop stop]) → bytes? client : redis? key : redis-key/c start : exact-integer? = 0 stop : exact-integer? = -1