MCPcopy Index your code
hub / github.com/1Panel-dev/MaxKB / update_execute

Function update_execute

apps/common/db/sql_execute.py:30–41  ·  view source on GitHub ↗

执行一条sql :param sql: 需要执行的sql :param params: sql参数 :return: 执行结果

(sql: str, params)

Source from the content-addressed store, hash-verified

28
29
30def update_execute(sql: str, params):
31 """
32 执行一条sql
33 :param sql: 需要执行的sql
34 :param params: sql参数
35 :return: 执行结果
36 """
37 with connection.cursor() as cursor:
38 cursor.execute(sql, params)
39 affected_rows = cursor.rowcount
40 cursor.close()
41 return affected_rows
42
43
44def select_list(sql: str, params: List):

Callers 5

create_knowledge_indexFunction · 0.90
drop_knowledge_indexFunction · 0.90
native_updateFunction · 0.90
runFunction · 0.85

Calls 2

executeMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected