Normally the kidney catches the sugar filtered from the blood and puts it back. SGLT-2 inhibitors stop that, so the extra sugar spills out in the urine.
SGLT-2 inhibitors — canagliflozin, dapagliflozin and empagliflozin — block glucose reabsorption in the proximal convoluted tubule, so glucose is lost in the urine. They usually cause weight loss. The sugary urine brings urinary and genital infections, and rarely Fournier's gangrene. They can cause normoglycaemic ketoacidosis, and raise the risk of lower-limb amputation, so the feet need watching.