这个程序是用来测试的,你肯定是这么写的?
with app.app_context():
with db.engine.connect() as conn:
rs = conn.execute("select 1")
print(rs.fetchone())
接下来我们需要对上面代码进行修改,如下所示:
from sqlalchemy import text