本文整理匯總了Python中DBManager.DBManager.executeSql方法的典型用法代碼示例。如果您正苦於以下問題:Python DBManager.executeSql方法的具體用法?Python DBManager.executeSql怎麽用?Python DBManager.executeSql使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類DBManager.DBManager
的用法示例。
在下文中一共展示了DBManager.executeSql方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: getSMO
# 需要導入模塊: from DBManager import DBManager [as 別名]
# 或者: from DBManager.DBManager import executeSql [as 別名]
def getSMO(self):
stmt=u"""select infisCode,shortName from Organisation where id in (select insurer_id from clientpolicy
where insurer_id is not null
group by insurer_id)"""
query = DBManager.executeSql(stmt)
return query
示例2: updatekladr
# 需要導入模塊: from DBManager import DBManager [as 別名]
# 或者: from DBManager.DBManager import executeSql [as 別名]
def updatekladr(self,listspr):
for spr in listspr:
for row in spr:
query=DBManager.executeSql(u"""select KOD_T_ST from kladr.SOCRBASE where SOCRNAME='{0}' and infisCode='{1}'""".format(spr[row],row))
if len(query)>0:
continue
else:
query=DBManager.executeSqlNonQuery(u"""update kladr.SOCRBASE set infisCode='{1}' where SOCRNAME='{0}'""".format(spr[row],row))