MCPcopy Create free account
hub / github.com/Y80/bmm / execute

Function execute

scripts/utils.mjs:9–18  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7export async function dbExecute(sql = '') {
8 const { db } = await import('@/db')
9 function execute() {
10 if (typeof db.execute === 'function') {
11 return db.execute.bind(db)
12 }
13 if (typeof db.$client.execute === 'function') {
14 return db.$client.execute.bind(db.$client)
15 }
16 exitWithDbClose(1)
17 throw new Error('无法获取数据库 execute() 方法')
18 }
19 return execute()(sql)
20}
21

Callers 1

dbExecuteFunction · 0.85

Calls 1

exitWithDbCloseFunction · 0.85

Tested by

no test coverage detected