当前位置: 首页>>代码示例>>Python>>正文


Python Dependency.call_get_data_entities_linked_from方法代码示例

本文整理汇总了Python中common.utilities.inversion_of_control.Dependency.call_get_data_entities_linked_from方法的典型用法代码示例。如果您正苦于以下问题:Python Dependency.call_get_data_entities_linked_from方法的具体用法?Python Dependency.call_get_data_entities_linked_from怎么用?Python Dependency.call_get_data_entities_linked_from使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在common.utilities.inversion_of_control.Dependency的用法示例。


在下文中一共展示了Dependency.call_get_data_entities_linked_from方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: select_count_trade_area_by_store

# 需要导入模块: from common.utilities.inversion_of_control import Dependency [as 别名]
# 或者: from common.utilities.inversion_of_control.Dependency import call_get_data_entities_linked_from [as 别名]
def select_count_trade_area_by_store(store_id):
    # get dependencies
    core_api_provider = Dependency("CoreAPIProvider").value
    param_builder = Dependency("CoreAPIParamsBuilder").value

    # create params
    filters = { "link.relation_type": "store_trade_area" }
    params = param_builder.create_get_data_entities_params(field_filters = filters)["params"]

    # run query and return first id
    return len(core_api_provider.call_get_data_entities_linked_from("trade_area", "store", store_id, params)["rows"])
开发者ID:erezrubinstein,项目名称:aa,代码行数:13,代码来源:data_access_misc_queries.py

示例2: delete_competitive_stores

# 需要导入模块: from common.utilities.inversion_of_control import Dependency [as 别名]
# 或者: from common.utilities.inversion_of_control.Dependency import call_get_data_entities_linked_from [as 别名]
def delete_competitive_stores(trade_area_id):
    # get dependency
    core_api_provider = Dependency("CoreAPIProvider").value
    param_builder = Dependency("CoreAPIParamsBuilder").value

    # create params
    filters = { "link.relation_type": "store_trade_area_competition" }
    params = param_builder.create_get_data_entities_params(field_filters = filters)["params"]

    # get links and store_ids
    links = core_api_provider.call_get_data_entities_linked_from("store", "trade_area", trade_area_id, params)["rows"]

    # for each store, delete link
    for link in links:

        # bomboj for
        core_api_provider.mds.call_del_link_without_id("store", link["to._id"], "away_store", "trade_area", trade_area_id, "trade_area", "store_trade_area_competition")
开发者ID:erezrubinstein,项目名称:aa,代码行数:19,代码来源:data_access_misc_queries.py

示例3: delete_test_competitors

# 需要导入模块: from common.utilities.inversion_of_control import Dependency [as 别名]
# 或者: from common.utilities.inversion_of_control.Dependency import call_get_data_entities_linked_from [as 别名]
def delete_test_competitors(company_id):
    # get dependency
    core_api_provider = Dependency("CoreAPIProvider").value
    param_builder = Dependency("CoreAPIParamsBuilder").value

    # create params
    filters = {
        "link.relation_type": "company_competition"
    }
    params = param_builder.create_get_data_entities_params(field_filters = filters)["params"]

    # get links
    links = core_api_provider.call_get_data_entities_linked_from("company", "company", company_id, params)["rows"]

    # delete links
    for link in links:

        # bomboj for
        core_api_provider.mds.call_del_link_without_id("company", company_id, "competitor", "company", link["to._id"], "competitor", "company_competition")
开发者ID:erezrubinstein,项目名称:aa,代码行数:21,代码来源:data_access_misc_queries.py


注:本文中的common.utilities.inversion_of_control.Dependency.call_get_data_entities_linked_from方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。