function getDialectByNameOrAlias(clientName) {
  const resolvedClientName = resolveClientNameWithAliases(clientName);
  const dialectLoader = dbNameToDialectLoader[resolvedClientName];
  if (!dialectLoader) {
    throw new Error(`Invalid clientName given: ${clientName}`);
  }
  return dialectLoader();
}
Gets the Dialect object with the given client name or throw an
error if not found.

NOTE: This is a replacement for prior practice of doing dynamic
string construction for imports of Dialect objects.