2

I was going through the instructions specified under SQL statements, and I got stuck at this line:

rows = connection.queryAll(query)

From where are we getting this connection object? Because I am sure this is not the object obtained from this statement

connection = connectionForURI(connection_string)

I also tried using dbconnection like this:

select = Select(['name', 'AVG(salary)'], staticTables=['employees'], groupBy='name')
query = dbconnection.sqlrepr(select)

But dbconnection doesn't have queryAll method.

Kaushik Shrestha
  • 932
  • 1
  • 11
  • 26

1 Answers1

0

connection = connectionForURI(connection_string) is exactly the connection object you're looking for. It has method queryAll.

phd
  • 82,685
  • 13
  • 120
  • 165