标签:engine ESS time 常用 bsp 映射 ppi nbsp UNC
sqlalchemy是一种常用的ORM(Object-Relational Mapping对象关系映射)框架。
1 from sqlalchemy import create_engine, Column, Integer, String, DateTime, Float, Date, BLOB, func, ForeignKey, extract, and_, or_, text 2 from sqlalchemy.orm import sessionmaker 3 from sqlalchemy.ext.declarative import declarative_base 4 5 #创建基类 6 ModelBase = declarative_base() 7 8 #创建映射表 9 class User(ModelBase): 10 __tablename__ = ‘user‘ 11 id = Column(Integer, primary_key=True, autoincrement=True)#自增主键 12 name = Column(String(80)) 13 createtime = Column(Datetime, index=True)
标签:engine ESS time 常用 bsp 映射 ppi nbsp UNC
原文地址:https://www.cnblogs.com/lhsblog/p/13162143.html