const params = formatSingleParams()

'use api/core/runtime/database/sql/tables.js'

// DB_NAME = 'system_sql'
// TABLE_NAME = ''

function main() {
    // 验证用户权限
    'use api/user/acl/excerpt.js'
    DB_NAME = payload.get().query.db_name
    TABLE_NAME = payload.get().query.table_name
    if (!TABLE_NAME) {
        TABLE_NAME = payload.get().path.split("/").pop();
    }
    let info = getTableCollums()
    let result = []
    info.forEach(t => {
        const newObj = Object.keys(t).reduce((acc, key) => {
            acc[key.toLowerCase()] = t[key];
            return acc;
        }, {});
        result.push(newObj)
    });
    return okMsg(result)
}