Kind of complex topic.
As most people in Sri Lanka worry about type 2 diabetes mellitus, the answer is there is no direct relationship between type 2 diabetes mellitus and the amount of sugar consumption. But I have used the word “direct” because there is an indirect relationship. If you consume, more sugar or carbohydrates than your body requires, that will lead to weight gain. Obesity will increases insulin requirement due to the development of insulin resistance. Then at one point, your insulin production can't catch up with the requirement causing inadequate production. Then that is the time you will develop type 2 diabetes mellitus. (simple explanation for the general population )
So if you can manage without weight gain, the risk would be low. But never zero, as there are hundreds of risk factors.
If we talk about type 1, the answer is straightforward and there is no relationship between sugar.
Not only the above two but there are many other diabetes variants.
Once you develop diabetes mellitus, you must control your sugar and carbohydrate intake. Because your body cannot maintain blood sugar at optimal level without drugs.
P.s.
You can do a simple google search to find about other risk factors for the development of diabetes mellitus.
P.s 2
By explaining above relationship I don't encourage you to eat sugars or sweets as it has so many negative effects on health and having healthy diet will prevent many non-communicable diseases.
ඒ වගෙම ඕනම දෙයක් ඕනවට වඩා හොද නෑ.