MCPcopy
hub / github.com/dqzboy/Docker-Proxy / run

Method run

hubcmdui/database/database.js:137–148  ·  view source on GitHub ↗

* 执行SQL语句

(sql, params = [])

Source from the content-addressed store, hash-verified

135 * 执行SQL语句
136 */
137 async run(sql, params = []) {
138 return new Promise((resolve, reject) => {
139 this.db.run(sql, params, function(err) {
140 if (err) {
141 logger.error('SQL执行失败:', err);
142 reject(err);
143 } else {
144 resolve({ id: this.lastID, changes: this.changes });
145 }
146 });
147 });
148 }
149
150 /**
151 * 查询单条记录

Callers 15

createTablesMethod · 0.95
createDefaultAdminMethod · 0.95
markAsInitializedMethod · 0.95
cleanExpiredSessionsMethod · 0.95
createUserMethod · 0.80
updateUserLoginInfoMethod · 0.80
changePasswordMethod · 0.80
changeUsernameMethod · 0.80
forceResetPasswordMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected