INNER CODE UNIT · JavaScript

changeLogTableName

currycan/HaTickets · desktop/src/sql/index.js:37

export const changeLogTableName = async () => {
    await initDb();
    // 设置唯一表名
    const appId = await getAppId()
    if(appId) {
        // Validate appId format before using in table name
        if (/^[a-zA-Z0-9_]+$/.test(appId)) {
            logTableName = `${appId}_LOG`;
        }
    }
};

export const dbPath = async () => {
    return `sqlite:${await appConfigDir()}${dbName}`
}

// 初始化数据库
export const initDb = async () => {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…