MULTI

Starts queuing commands for a transaction.

Transactions · Example verified

Syntax covered here

MULTI

The case queues SET followed by GET; EXEC then executes them in order so the read observes the write.

Tested example & replies

Requests below run in order against an empty database. Each connection authenticates with the fixture password first. Quoted values are strings; null is a nil reply; arrays preserve RESP order.

# connection: default
> MULTI
"OK"
# connection: default
> SET sample value
"QUEUED"
# connection: default
> GET sample
"QUEUED"
# connection: default
> EXEC
["OK","value"]