from sqlalchemy import text
conn=engine.connect();
s=text("insert into aws_rcsy(topic)values(:topic)");
q_insert=conn.execute(s,topic=topic);
conn.close();
如何获取刚插入数据的id?
ps:q_insert返回<sqlalchemy.engine.base.ResultProxy object at 0x...>
从q_insert中能否获取row数据?
q.lastrowid
复制过来的代码,没有验证过
参考 stack-overflow