javascript – Does the .then () method called for promises return a promise that reflects the results of the former?

I am new to promises and have studied it. So my code and my understanding:

    sql.connect (config) .then (function (connection)
return connection.request (). query (* select * from Users & # 39;)

}). then (function (result)
console.dir (result);
res.send (result);

}). catch ((err) => {console.log (err); res.send (err)});
  1. In the first line of the connect Method returns a promise So I call a function then (if connect had success). The then accepts callbacks, d. H. successCB, failureCB as args, which actually represents that Result or error returned by the connect promise. Right?

  2. Also the successCB is to return the promise (of .Query).

  3. Then will be recalled on previously returned pledge.

Are my assumptions correct?