Cumulative Project: Gold Medal Metrics- What's going on?

I feel like there have been some assumptions made that I’m not getting with this project.

How do you write SQL queries in a JavaScript function? Am I the only one confused about how these link together? Where in the course does it talk about this??



I was lost to even start this project too! For starters, I couldn’t even install it. It appears the old sqlite version listed in the package dependencies doesn’t work. I removed that line and just installed the latest (currently 5.0.0).

Once installed, I looked at the first challenge and thought it meant writing sql in js. I wondered if the project was out of sync in the syllablus and maybe it should come after the node-sqlite section.

However, after much frustration, I took a quick look at the solution, not in detail to study how they had written all the answers, but just a quick check to even see what on earth they were talking about. It seems the sql.js file just asks you to write simple js functions that return sql query strings, for example:

function showall() {
  return "SELECT * FROM db"

I believe the server.js file will actually be responsible for running the query through the database, which I suspect is what will be covered in the next topic of the career path.
But I agree, not a great explanation!

It does technically say this in the instructions, but it could have been made clearer, perhaps in bold.

To complete this project, you will need to write a series of JavaScript functions that return the SQL queries that operate Gold Medal Metrics.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.