2

我正在阅读SQL statements下指定的说明,但我被困在了这一行:

rows = connection.queryAll(query)

我们从哪里得到这个连接对象?因为我确定这不是从这个语句中得到的对象

connection = connectionForURI(connection_string)

我也尝试过像这样使用 dbconnection:

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

但是 dbconnection 没有 queryAll 方法。

4

1 回答 1

0

connection = connectionForURI(connection_string)正是您正在寻找的连接对象。它方法queryAll

于 2017-05-07T16:09:03.643 回答