本文整理汇总了Python中Src.Function.Base.Base.query方法的典型用法代码示例。如果您正苦于以下问题:Python Base.query方法的具体用法?Python Base.query怎么用?Python Base.query使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Src.Function.Base.Base
的用法示例。
在下文中一共展示了Base.query方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: insert_ifNameFromTestResult
# 需要导入模块: from Src.Function.Base import Base [as 别名]
# 或者: from Src.Function.Base.Base import query [as 别名]
def insert_ifNameFromTestResult(self):
"""
如果api_pass_rate表中没有该条if_name则将if_name插入该表中
:param data:
:param table:
:return:
"""
sql = "INSERT INTO api_pass_rate_wph (if_name) SELECT DISTINCT `if_name` FROM test_result WHERE if_name NOT IN(SELECT if_name FROM api_pass_rate_wph);"
sql1 = "INSERT INTO api_pass_rate (if_name) SELECT DISTINCT `if_name` FROM test_result WHERE if_name NOT IN(SELECT if_name FROM api_pass_rate);"
return Base.query(self, sql), Base.query(self, sql1)
示例2: get_performanceOrderByIfname
# 需要导入模块: from Src.Function.Base import Base [as 别名]
# 或者: from Src.Function.Base.Base import query [as 别名]
def get_performanceOrderByIfname(self, type, orderby='if_name', method='esc'):
"""
查询表 最近300条最终按照if_name 排序输出
:return:
"""
sql = "select * from (select * from api_performance order by id desc limit 300) a where type = '" + type + "' order by " + orderby + " " + method + ";"
test_result = Base.query(self, sql)
return test_result
示例3: update_fail_num
# 需要导入模块: from Src.Function.Base import Base [as 别名]
# 或者: from Src.Function.Base.Base import query [as 别名]
def update_fail_num(self, if_name):
"""
更新Fail_num字段
:param if_name:
:return:
"""
type = Base.getApiType(self, if_name)
sql = "UPDATE api_pass_rate_wph SET url_target='" + url_target + "',`type`='" + type + "',fail_num=fail_num+1 WHERE if_name = '" + if_name + "';"
return Base.query(self, sql)
示例4: update_pass_num
# 需要导入模块: from Src.Function.Base import Base [as 别名]
# 或者: from Src.Function.Base.Base import query [as 别名]
def update_pass_num(self, if_name):
type = Base.getApiType(self, if_name)
sql = "UPDATE api_pass_rate_wph SET url_target='" + url_target + "',`type`='" + type + "',pass_num=pass_num+1 WHERE if_name = '" + if_name + "';"
return Base.query(self, sql)