摘要: import sqlalchemy from sqlalchemy import create_engine from sqlalchemy import Column,String,Integer,ForeignKey from sqlalchemy.orm import sessionmaker from sqlalchemy.ext.declarative import declarati... 阅读全文
posted @ 2018-03-13 23:18 山上有风景 阅读(542) 评论(0) 推荐(0)
摘要: 定义一个类,ORM(对象关系映射)将这个类转换为sql语句,使用pymysql进行执行 一,底层处理 使用engine/connectionpooling/dialect进行数据库操作,engine使用connectionpooling连接数据库,然后在通过dialect执行sql语句(SQLAlc 阅读全文
posted @ 2018-03-13 19:28 山上有风景 阅读(385) 评论(0) 推荐(0)