MCPcopy Create free account
hub / github.com/Boris-code/feapder / update

Method update

feapder/db/mysqldb.py:321–340  ·  view source on GitHub ↗
(self, sql)

Source from the content-addressed store, hash-verified

319 return self.add_batch(sql, datas)
320
321 def update(self, sql) -> int:
322 affect_count = None
323 conn, cursor = None, None
324
325 try:
326 conn, cursor = self.get_connection()
327 affect_count = cursor.execute(sql)
328 conn.commit()
329 except Exception as e:
330 log.error(
331 """
332 error:%s
333 sql: %s
334 """
335 % (e, sql)
336 )
337 finally:
338 self.close_connection(conn, cursor)
339
340 return affect_count
341
342 def update_smart(self, table, data: Dict, condition) -> int:
343 """

Callers 3

update_smartMethod · 0.95
_make_hashfuncsFunction · 0.45
from_urlMethod · 0.45

Calls 4

get_connectionMethod · 0.95
close_connectionMethod · 0.95
executeMethod · 0.80
errorMethod · 0.80

Tested by

no test coverage detected