function addRole() {

    inquirer.prompt ([
        {
            type: 'input',
            name: 'name',
            message: "Enter name of role."
        },
        {
            type: 'input',
            name: 'salary',
            message: "Enter salary."
        },
        {
            type: 'input',
            name: 'department',
            message: "Enter department id."
        }
       
    ])
        .then (answer => {
            
            db.query(`insert into roles (title, salary, department_id) values ("${answer.name}", ${answer.salary}, ${answer.department})`, function (err, results) {
                
            start();
             
            })

        })
      
        .catch(err => { console.log(err)});

}
// function to add the users selection
function to add the users selection
function to add the users selection
function addRole() {
    inquirer.prompt ([
        {
            type: 'input',
            name: 'name',
            message: "Enter name of role."
        },
        {
            type: 'input',
            name: 'salary',
            message: "Enter salary."
        },
        {
            type: 'input',
            name: 'department',
            message: "Enter department id."
        }
    ])
        .then (answer => {
            db.query(`insert into roles (title, salary, department_id) values ("${answer.name}", ${answer.salary}, ${answer.department})`, function (err, results) {
            start();
            })
        })
        .catch(err => { console.log(err)});
}
function addRole ( ) { inquirer . prompt ( [ { type : 'input' , name : 'name' , message : "Enter name of role." } , { type : 'input' , name : 'salary' , message : "Enter salary." } , { type : 'input' , name : 'department' , message : "Enter department id." } ] ) . then ( answer => { db . query ( ` ${ answer . name } ${ answer . salary } ${ answer . department } ` , function ( err , results ) { start ( ) ; } ) } ) . catch ( err => { console . log ( err ) } ) ; }
function to add the users selection
function to add the users selection