def test03(): """独立连接""" print(test03.__doc__) target_user_api = DbApi(get_target_db(), User) print(target_user_api.count()) target_user_api = DbApi(get_target_db(), User) print(target_user_api.count())
def test02(): """独立连接""" print(test02.__doc__) source_user_api = DbApi(get_source_db(), EAPUser) print(source_user_api.count()) source_user_api = DbApi(get_source_db(), EAPUser) print(source_user_api.count())
def test01(): """共用连接""" print(test01.__doc__) target_user_api = DbApi(target_db, User) print(target_user_api.count()) target_user_api = DbApi(target_db, User) print(target_user_api.count())
def test01(): """共用连接""" print(test01.__doc__) source_user_api = DbApi(source_db, EAPUser) print(source_user_api.count()) source_user_api = DbApi(source_db, EAPUser) print(source_user_api.count())