anchor.diff:                      }
          ).
   -define(skvhTable,  [binterm,binstr,binstr]).
  -
  --define(ADDIF(__Flags,__Opts,__Code),
  -        (fun(_F,_O) ->
  -            case lists:member(_F,_O) of
  -                 true -> __Code;
  -                 false -> ""
  -            end
  -         end)(__Flags,__Opts)).
   
   % -define(E100,{100,"Invalid key"}).
   % -define(E101,{101,"Duplicate key"}).
  
positive.code:        "        true ->  ok;\n"
         "        false -> ok = imem_dal_skvh:write_audit(AuditInfoList)\n"
         "    end"),
         ?ADDIF(history, __Opts,
         ",\n    case lists:member(no_history,TrOpts) of \n"
         "        true ->  ok;\n"
         "        false -> ok = imem_dal_skvh:write_history(HistoryTable,AuditInfoList)\n"
         "    end"),
         (fun(_E) ->
                  if length(_E) == 0 -> "";
                     true -> ",\n    "++_E end
          end)(__ExtraFun),
         "\n    %extend_code_start"
         "\n    %extend_code_end"
         "\nend."]).
  
negative.code:     HC = list_to_atom(?HIST(Channel)),
      ok = imem_meta:create_table(HC, {record_info(fields, skvhHist),?skvhHist, #skvhHist{}}, ?HIST_OPTS, Owner).
  
  add_if(F, Opts, Code) ->
      case lists:member(F,Opts) of
          true -> Code;
          false -> ""
      end.
  skvh_trigger(Opts, ExtraFun) ->
      list_to_binary(
        ["fun(OldRec,NewRec,Table,User,TrOpts) ->\n"
         "    start_trigger",
         add_if(audit, Opts,
         ",\n    {AuditTable,HistoryTable,TransTime,Channel}\n"
         "        = imem_dal_skvh:build_aux_table_info(Table),\n"
         "    AuditInfoList = imem_dal_skvh:audit_info(User,Channel,AuditTable,TransTime,OldRec,NewRec),\n"
  