I just can't seem to wrap my head around chaining queries with promises. What's confusing me the most is the .then(function(doSomething) part.
What am I supposed to put in the function(doSomething)? And what does it do?
Could someone chain these queries for me without using Promise.all but instead using .then()? So I can learn from this
SELECT * FROM books where book_id = $1
SELECT * FROM username where username = $2
SELECT * FROM saved where saved_id = $3