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


Python DB.fetchall_cacheable方法代码示例

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


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

示例1: _refresh

# 需要导入模块: import DB [as 别名]
# 或者: from DB import fetchall_cacheable [as 别名]
 def _refresh (self):
     sql = self._get_sql()
     self.sql_result = DB.fetchall_cacheable (sql)
     return True
开发者ID:alobbs,项目名称:rhos-tasks,代码行数:6,代码来源:App.py

示例2: get_org_id

# 需要导入模块: import DB [as 别名]
# 或者: from DB import fetchall_cacheable [as 别名]
def get_org_id(mail = conf.USER):
    username = mail.split('@')[0]
    SQL = "select id from \"OrgChart2S.User\" u where u.Uid = '%s'" %(username)
    return DB.fetchall_cacheable(SQL)[0]['id']
开发者ID:alobbs,项目名称:rhos-tasks,代码行数:6,代码来源:Org.py

示例3: get_manager

# 需要导入模块: import DB [as 别名]
# 或者: from DB import fetchall_cacheable [as 别名]
def get_manager(mail = conf.USER):
    username = mail.split('@')[0]
    SQL = "select uid,realname from \"OrgChart2S.User\" u where u.id = ( select Manager from \"OrgChart2S.User\" u where u.Uid = '%s' )" %(username)
    return DB.fetchall_cacheable(SQL)
开发者ID:alobbs,项目名称:rhos-tasks,代码行数:6,代码来源:Org.py

示例4: get_direct_reports

# 需要导入模块: import DB [as 别名]
# 或者: from DB import fetchall_cacheable [as 别名]
def get_direct_reports(mail = conf.USER):
    manager_id = get_org_id()
    SQL = "select uid,realname from \"OrgChart2S.User\" u where u.Manager = '%s'" %(manager_id)
    return DB.fetchall_cacheable(SQL)
开发者ID:alobbs,项目名称:rhos-tasks,代码行数:6,代码来源:Org.py

示例5: get_user_id

# 需要导入模块: import DB [as 别名]
# 或者: from DB import fetchall_cacheable [as 别名]
def get_user_id(username = conf.USER):
    SQL = "select userid from BugzillaS.profiles profiles where profiles.login_name = '%s'" %(username)
    return DB.fetchall_cacheable(SQL)[0]['userid']
开发者ID:alobbs,项目名称:rhos-tasks,代码行数:5,代码来源:Bugs.py

示例6: get_product_id

# 需要导入模块: import DB [as 别名]
# 或者: from DB import fetchall_cacheable [as 别名]
def get_product_id(product = conf.TASKS_PRODUCT):
    SQL = "select id from BugzillaS.products products where products.name = '%s'" %(product)
    return DB.fetchall_cacheable(SQL)[0]['id']
开发者ID:alobbs,项目名称:rhos-tasks,代码行数:5,代码来源:Bugs.py


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