mirror of
https://github.com/Syngnat/GoNavi.git
synced 2026-08-02 11:48:23 +08:00
✨ feat(sql-audit): 新增 SQL 审计中心并完善事务追踪
- 新增脱敏审计存储、筛选、保留策略、完整性校验与 JSON/CSV 导出 - 覆盖查询编辑器、事务、导入同步、对象操作、AI/MCP 与 Web 运行时入口 - 完善事务完整语句日志、Windows 快捷键映射及 SQL 分析布局 - 补充多语言、健康状态、数据目录迁移和回归测试
This commit is contained in:
21
internal/app/sql_audit_atomic_replace_windows.go
Normal file
21
internal/app/sql_audit_atomic_replace_windows.go
Normal file
@@ -0,0 +1,21 @@
|
||||
//go:build windows
|
||||
|
||||
package app
|
||||
|
||||
import "golang.org/x/sys/windows"
|
||||
|
||||
func atomicReplaceSQLAuditFile(source, target string) error {
|
||||
sourcePath, err := windows.UTF16PtrFromString(source)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
targetPath, err := windows.UTF16PtrFromString(target)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return windows.MoveFileEx(
|
||||
sourcePath,
|
||||
targetPath,
|
||||
windows.MOVEFILE_REPLACE_EXISTING|windows.MOVEFILE_WRITE_THROUGH,
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user