with engine.connect() as conn:
conn.execute(text("insert into teacher(user_id, name, subject) values(:a,:b,:c)"), [{"a": "88888888", "b": "叭叭叭巴巴爸爸", "c": "科目"}])
conn.execute(text("insert into teacher(user_id, name, subject) values(:a,:b,:c)"), [{"a": "88888888", "b": "叭叭叭巴巴爸爸", "c": "科目"}])
conn.commit()
result = conn.execute(text("select * from users"))
teachers = result.cursor.fetchall()
return {"teachers": teachers}
teachers = result.cursor.fetchall()
return {"teachers": teachers}