Hello,
I'm trying to get the column names from a table using the following code:
import db_postgres
...
for row in db.instantRows(sql"SELECT first_name, last_name, id, age FROM
test_table"):
echo "Row has ", len(row), " columns" # Row has 4 columns
echo "Column name: ", row[0].attDescs.name # Column name: first_name
echo "Column name: ", row[1].attDescs.name # Error: undeclared field:
'attDescs'
I can get only the name of the first column but not for the other columns...
Can somebody guide me?
Thank you!
Nim Compiler Version 0.16.1 (2017-01-28) [Windows: i386]