Closed d9k closed 3 years ago
tuple:copy()
does this. It's not documented though.
@daurnimator, thanks! @mbalmer, please improve the docs regarding this method.
Keep an eye on https://lua.msys.ch/lua-module-reference.html#pgsql, I will add the tuple:copy() function there. Probably in a section "Lua specific functions".
Is it possible to present query result row as associative array, where key is column name and value is column value for current row?
see http://php.net/manual/en/function.pg-fetch-assoc.php and http://norman.github.io/lua-postgres/modules/postgres.result.html#fetch_assoc