Skip to content

Nickm615/Employee-Tracker

Repository files navigation

Homework-12-Employee-Tracker

This is a command-line app that generates a database of employee information and allows a user to view and manipulate it. The schema creates three tables, one for departments, one for employees. It offers 7 different options via an inquirer prompt. The 3 view options are the same, they simply query the database and display them using console.table. The more complicated functions are housed in separate files. The initial function is passed into these functions so they can run the init once they complete, resetting the command line prompt and allowing further operations by the user.

addRole creates a row in the role table generated from user input and exports its function to be called in the init prompt. addDept and addEmp work almost exactly the same. updateEmp is very similar except that it updates an existing row in the employee table rather than creating a new row. I think the hardest part was getting the syntax on the join right, but I got it eventually even though its ugly. Thanks for reading and reviewing!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages