Python sqlalchemy.orm 模块,configure_mappers() 实例源码

我们从Python开源项目中,提取了以下1个代码示例,用于说明如何使用sqlalchemy.orm.configure_mappers()

项目:PyTouch    作者:mNisblee    | 项目源码 | 文件源码
def set_sqlite_pragma(dbapi_connection, connection_record):
    cursor = dbapi_connection.cursor()
    cursor.execute("PRAGMA foreign_keys=ON")
    cursor.close()


# run configure_mappers after defining all of the models to ensure
# all relationships can be setup