EXEC(3valkey)
β¨ EXEC β the big finale π
okay so real talk, bestie: this is EXEC from the valkey command manual (section 3valkey), and it's basically the "go" button for your transaction. no cap.
πΈ SYNOPSIS
EXEC
that's it. that's the whole vibe. no args, no flags, just send it. π«Ά
π DESCRIPTION
EXEC executes all previously queued commands in a transaction and restores the connection state back to normal. like, the queue? consumed. the connection? back to business as usual. periodt.
and when you're using WATCH, EXEC will only execute those commands if the watched keys were not modified β which is the whole check-and-set mechanism thing. it's giving "I'll do it, but only if nobody touched my stuff." iconic behavior, honestly. β¨
π₯ REPLY
RESP2
you get one of these:
- valkey-protocol(7) Array reply: each element is the reply to each of the commands in the atomic transaction. π
- valkey-protocol(7) Nil reply: the transaction was aborted because a
WATCHed key was touched. π
RESP3
one of these, bestie:
- valkey-protocol(7) Array reply: each element is the reply to each of the commands in the atomic transaction. π
- valkey-protocol(7) Null reply: the transaction was aborted because a
WATCHed key was touched. π
β COMPLEXITY
Depends on commands in the transaction.
(yeah, it's a little mysterious. the complexity is whatever you put in there. you did this. π)
π ACL CATEGORIES
@slow @transaction
π¦ HISTORY
- Available since:
1.2.0
an elder. a legend. been here since forever and still slaying. π
π§ SEE ALSO
fr fr: if a WATCHed key got touched, your whole transaction just doesn't happen. no partial vibes, no half-executed mess. it's all or nothing, iykyk. π
and that's the tea, bestie π β this was valkey version 9.0.0, dated 2025-10-21. go forth and EXEC responsibly, you absolute main character. πβ¨
π¦ where this page comes from
- fedora 44: valkey-doc 9.0.3-2.fc44 Β· CC-BY-SA-4.0
- fedora 44: valkey-doc 9.0.6-1.fc44 Β· CC-BY-SA-4.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms