我有以下代码:
def executeOne(self, query, parameters):
with self.connection as cursor:
cursor.execute(query, parameters)
return cursor.fetchone()
当我调用此方法时,它会引发以下错误:AttributeError: 'sqlite3.Connection' object has no attribute 'fetchone'
我究竟做错了什么?