public static string GetConflictClauseString(SQLiteResolveAction conf) { StringBuilder sb = new StringBuilder(); sb.Append("ON CONFLICT "); switch (conf) { case SQLiteResolveAction.Ignore: sb.Append("IGNORE"); break; case SQLiteResolveAction.Replace: sb.Append("REPLACE"); break; case SQLiteResolveAction.Rollback: sb.Append("ROLLBACK"); break; case SQLiteResolveAction.Abort: sb.Append("ABORT"); break; case SQLiteResolveAction.Fail: sb.Append("FAIL"); break; default: throw new ArgumentException("Illegal resolve action [" + conf.ToString() + "]"); } // switch return(sb.ToString()); }
public static string GetResolveActionString(SQLiteResolveAction action) { switch (action) { case SQLiteResolveAction.Ignore: return("IGNORE"); case SQLiteResolveAction.Replace: return("REPLACE"); case SQLiteResolveAction.Rollback: return("ROLLBACK"); case SQLiteResolveAction.Abort: return("ABORT"); case SQLiteResolveAction.Fail: return("FAIL"); default: throw new ArgumentException("illegal action type [" + action.ToString() + "]"); } // switch }