In this case both hydrolysis and electrolysis occurs in the process.
The difference between two processes are given below.
Hydrolysis, in chemistry and physiology, a double decomposition reaction with water as one of the reactants. Thus, if a compound is represented by the formula AB in which A and B are atoms or groups and water is represented by the formula HOH, the hydrolysis reaction may be represented by the reversible chemical equation AB + HOH ⇌ AH + BOH.
Electrolysis, process by which electric current is passed through a substance to effect a chemical change. The chemical change is one in which the substance loses or gains an electron (oxidation or reduction). The process is carried out in an electrolytic cell.