const config = require('../config')
const pre = config.database.pre
const QueryBuilder = require('node-querybuilder');
const pool = new QueryBuilder(config.settings, 'mysql', 'pool');


async function get_loader() {
    try {
        let qb = await pool.get_connection();
        let response = await qb.select('spinner').get(pre+'_company_master');
        // console.log("Query Ran: " + qb.last_query());
        qb.release();
        return response[0];
    } catch (err) {
        console.error(err.msg)
        return "Fail";
    }
  }

  
module.exports = {get_loader}
