getDeleteRule function
SQLite Delete Rules
Implementation
DeleteRule getDeleteRule(String rule) {
switch (rule) {
case 'NO ACTION':
return DeleteRule.NO_ACTION;
case 'CASCADE':
return DeleteRule.CASCADE;
case 'SET DEFAULT VALUE':
return DeleteRule.SET_DEFAULT_VALUE;
case 'SET NULL':
return DeleteRule.SET_NULL;
default:
return DeleteRule.NO_ACTION;
}
}