本文整理汇总了Python中Src.Function.Base.Base.select方法的典型用法代码示例。如果您正苦于以下问题:Python Base.select方法的具体用法?Python Base.select怎么用?Python Base.select使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Src.Function.Base.Base
的用法示例。
在下文中一共展示了Base.select方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_testResultOrderByIfName
# 需要导入模块: from Src.Function.Base import Base [as 别名]
# 或者: from Src.Function.Base.Base import select [as 别名]
def get_testResultOrderByIfName(self):
"""
查询y接口状态
:param if_name:'a01'
:return:[{}]
"""
kwargs = dict(table=self.table, order='if_name')
return Base.select(self, **kwargs)
示例2: get_testResultByIfName
# 需要导入模块: from Src.Function.Base import Base [as 别名]
# 或者: from Src.Function.Base.Base import select [as 别名]
def get_testResultByIfName(self, if_name):
"""
查询y接口状态
:param if_name:'a01'
:return:{}
"""
where = "if_name='%s'" % if_name
kwargs = dict(table=self.table, where=where)
return Base.select(self, **kwargs)
示例3: get_testResultByUrl
# 需要导入模块: from Src.Function.Base import Base [as 别名]
# 或者: from Src.Function.Base.Base import select [as 别名]
def get_testResultByUrl(self, url):
"""
根据url查询全部数据
:param url:
:return:
"""
where = "url_target LIKE '"+url+"%'"
kwargs = dict(table=self.table, where=where)
return Base.select(self, **kwargs)
示例4: get_testShortUrlByTag
# 需要导入模块: from Src.Function.Base import Base [as 别名]
# 或者: from Src.Function.Base.Base import select [as 别名]
def get_testShortUrlByTag(self, short_tag):
"""
查询y接口状态
:param short_tag:'ssdf'
:return:{}
"""
where = "short_tag='%s'" % short_tag
kwargs = dict(table=self.table, where=where)
return Base.select(self, **kwargs)
示例5: getApiPassRateWphByIfName
# 需要导入模块: from Src.Function.Base import Base [as 别名]
# 或者: from Src.Function.Base.Base import select [as 别名]
def getApiPassRateWphByIfName(self, if_name):
"""
查询y接口通过率
:param if_name:'a01'
:return:{}
"""
data = "round(((`pass_num`)/(fail_num+pass_num)*100),2) AS pass_rate, if_name"
where = "if_name='%s'" % if_name
kwargs = dict(data=data, table=self.table, where=where)
return Base.select(self, **kwargs)
示例6: get_apiPerformanceAvgByIfName
# 需要导入模块: from Src.Function.Base import Base [as 别名]
# 或者: from Src.Function.Base.Base import select [as 别名]
def get_apiPerformanceAvgByIfName(self, if_name):
"""
查询y接口响应时间
:param if_name:'a01'
:return:{}
"""
data = "if_name,res_time_avg"
where = "if_name='%s'" % if_name
kwargs = dict(data=data, table=self.table, where=where)
return Base.select(self, **kwargs)
示例7: get_apiPerformanceAvgByIfName
# 需要导入模块: from Src.Function.Base import Base [as 别名]
# 或者: from Src.Function.Base.Base import select [as 别名]
def get_apiPerformanceAvgByIfName(self, if_name):
"""
查询接口平均响应时间
:param if_name:
:return: {}
"""
data = "round(AVG(res_time),4) as res_time,if_name"
where = "if_name='%s'" % if_name
kwargs = dict(data=data, table=self.table, where=where)
return Base.select(self, **kwargs)
示例8: select
# 需要导入模块: from Src.Function.Base import Base [as 别名]
# 或者: from Src.Function.Base.Base import select [as 别名]
def select(self, data='', where='', limit='', order='', group=''):
"""
查询当前表
:param data:
:param where:
:param limit:
:param order:
:param group:
:return:
"""
kwargs = dict(data=data, table=self.table, where=where, limit=limit, order=order, group=group)
return Base.select(self, **kwargs)
示例9: select_todo
# 需要导入模块: from Src.Function.Base import Base [as 别名]
# 或者: from Src.Function.Base.Base import select [as 别名]
def select_todo(self, data='', where='', limit='', order='', group=''):
kwargs = dict(data=data, table=self.table, where=where, limit=limit, order=order, group=group)
result = Base.select(self, **kwargs)
return result
示例10: get_testResultByUrl
# 需要导入模块: from Src.Function.Base import Base [as 别名]
# 或者: from Src.Function.Base.Base import select [as 别名]
def get_testResultByUrl(self, url):
where = "url_target LIKE '"+url+"%'"
kwargs = dict(table=self.table, where=where)
return Base.select(self, **kwargs)
示例11: get_allType
# 需要导入模块: from Src.Function.Base import Base [as 别名]
# 或者: from Src.Function.Base.Base import select [as 别名]
def get_allType(self):
data = "DISTINCT type"
kwargs = dict(data=data, table=self.table)
return Base.select(self, **kwargs)