當前位置: 首頁>>代碼示例>>Python>>正文


Python Base.query方法代碼示例

本文整理匯總了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)
開發者ID:xcma,項目名稱:selenium,代碼行數:12,代碼來源:test_result.py

示例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
開發者ID:xcma,項目名稱:selenium,代碼行數:10,代碼來源:api_performance.py

示例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)
開發者ID:xcma,項目名稱:selenium,代碼行數:11,代碼來源:api_pass_rate_wph.py

示例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)
開發者ID:xcma,項目名稱:selenium,代碼行數:6,代碼來源:api_pass_rate_wph.py


注:本文中的Src.Function.Base.Base.query方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。