lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


It was thus said that the Great Alexander Gladysh once stated:
> 
> For multibulk replies it is plain wrong — user does want to see
> results of execution of other commands in MULTI/EXEC.
> 
> To give some concrete example:
> 
> MULTI
> SET a 3
> LPOP a
> INCR a
> EXEC
> 
> Returns:
> 
> 1. OK
> 2. (error) ERR Operation against a key holding the wrong kind of value
> 3. (integer) 4
> 
> How should this result be returned to Lua?
> 
> {
>   "OK",
>   -- how to express error message here?
>   4
> }
> 
> Any hints?

  How about:

{
  { true  , "OK" } ,
  { false , error_value } ,
  { true , 4 }
}

  -spc