Drupal 8 Query Questions
Is there a reason to be using \Drupal::database() vs \Drupal\core\Database\Database::getConnection()?


Yes. The former returns a correctly instantiated service object, with all required dependencies automatically injected. You would need to load up all the relevant services yourself and inject them manually if using the latter method.


  How do I know when I can chain my query methods and when I can not?


There are 2 common approaches:


Read the docs for the methods you're using.
Use an IDE with good code completion.