anchor.diff:      {Field, FieldType, _OldVal} = lists:keyfind(Field, 1, TupleList),
       lists:keyreplace(Field, 1, TupleList, {Field, FieldType, NewVal}).
   
  --record(filtercheck, {name,'=','>'}).
  +-record(filtercheck, {name,'=','>','>='}).
   
   check_where_clause_is_possible(DDL, WhereProps) ->
       Filter1 = proplists:get_value(filter, WhereProps),
  
positive.code:         S?SQL_SELECT.'WHERE'
      ).
  
  -endif.
  
negative.code:             Acc3 = append_to_eliminate_later(F_x, Acc2),
              {F, Acc3}
      end;
  check_where_clause_is_possible_fold(_, _, {'>=',{field,FieldName,_},{const,_GteVal}} = F, Acc) ->
      case find_filter_check(FieldName, Acc) of
          #filtercheck{'>=' = undefined} = Check1 ->
              %% this is the first equality check so just record it
              Check2 = Check1#filtercheck{'>=' = F},
              {F, lists:keystore(FieldName, #filtercheck.name, Acc, Check2)};
          #filtercheck{'>=' = F} ->
              %% this filter has been specified twice so remove the second occurence
              {eliminate, Acc};
          #filtercheck{'>=' = F_x} when F_x < F ->
              %% we already have a filter that is a lower value than
              {eliminate, Acc};
          #filtercheck{'>=' = F_x} = Check1 when F_x > F ->
              %% we already have a filter that is higher than the second one,
              %% which we can eliminate. Store it and eliminate it on the second
              %% pass since it has already been iterated
              Check2 = Check1#filtercheck{'>=' = F},
              Acc2 = lists:keystore(FieldName, #filtercheck.name, Acc, Check2),
              Acc3 = append_to_eliminate_later(F_x, Acc2),
              {F, Acc3}
      end;
  check_where_clause_is_possible_fold(_, _, Filter, Acc) ->
      {Filter, Acc}.
  
  