lua-users home
lua-l archive

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

Quoth "Henderson, Michael D" <>, on 2011-05-04 10:39:30 -0600:
>         result = { meta = resultMeta, set = resultSet, rowCount = #set }
> I'd like something friendlier like
>         result[rowNumber][columnB]

I can't speak for Lua-in-general, of course, but roughly speaking, I'd
prefer something like:

  Result set: integer keys -> rows;
              string keys -> various metadata if needed.
  Row: integer keys -> cell values in order (by column index);
       string keys -> cell values by column name.

Also, if you're going to describe the output columns, I'd use a
similar format to the row keys: have each description record
referenced both by index and by name.

Primarily you'd be unifying the result and resultSet tables here.

Is that about what you were looking for?

   ---> Drake Wilson