mirror of
https://github.com/CodePhiliaX/Chat2DB.git
synced 2026-03-13 09:02:05 +08:00
perf: Remove front-end formatting
This commit is contained in:
@@ -216,10 +216,11 @@ export function osNow(): {
|
||||
export function formatSql(sql: string, dbType: DatabaseTypeCode) {
|
||||
return new Promise((r: (sql: string) => void) => {
|
||||
let formatRes = '';
|
||||
try {
|
||||
formatRes = format(sql || '');
|
||||
} catch {}
|
||||
// 如果格式化失败,直接返回原始sql
|
||||
// try {
|
||||
// formatRes = format(sql || '');
|
||||
// // formatRes = '';
|
||||
// } catch {}
|
||||
// // 如果格式化失败,直接返回原始sql
|
||||
if (!formatRes) {
|
||||
sqlServer
|
||||
.sqlFormat({
|
||||
|
||||
Reference in New Issue
Block a user