DB-API: some SQL implementations need subqueries to be named
This commit is contained in:
parent
a925aa5cc8
commit
3ccc3a3512
@ -1867,7 +1867,7 @@ class DBAPI(DbGeneric):
|
|||||||
", ".join(select_fields), table_name, where_clause, order_clause, limit
|
", ".join(select_fields), table_name, where_clause, order_clause, limit
|
||||||
)
|
)
|
||||||
if get_count_only:
|
if get_count_only:
|
||||||
self.dbapi.execute("SELECT count(1) from (%s);" % query)
|
self.dbapi.execute("SELECT count(1) from (%s) AS temp_select;" % query)
|
||||||
rows = self.dbapi.fetchall()
|
rows = self.dbapi.fetchall()
|
||||||
yield rows[0][0]
|
yield rows[0][0]
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user