anchor.diff:    end.
   
   
  +%%-------------------------------------------------
  +%% Internal functions
  +%%-------------------------------------------------
  +
  +
  +-spec get_var_selector_fun(var_selector()) -> fun((var_id()) -> boolean()).
  +get_var_selector_fun(all_vars) ->
  +  fun (_) -> true end;
  +get_var_selector_fun(VarIds) when is_list(VarIds) ->
  +  fun (V) -> lists:member(V,VarIds) end.
  
positive.code: update_now() ->
    raws_ingest_server:update_now().
  
  -spec retrieve_observations(string(),{calendar:datetime(),calendar:datetime()}) -> [#raws_obs{}].
  retrieve_observations(StId,{From,To}) ->
    case mnesia:transaction(
      fun() ->
          Q = qlc:q([X || X=#raws_obs{timestamp=T,station_id=S} <- mnesia:table(raws_obs), S =:= StId, T >= From, T =< To]),
          qlc:e(Q) end) of
      {atomic, R} ->
        R;
  
negative.code:   end.
  
  
  -spec retrieve_station_info(string()) -> #raws_station{} | no_such_station.
  retrieve_station_info(StId) ->
    case mnesia:transaction(fun () -> mnesia:read({raws_station,StId}) end) of
      {atomic,[StInfo]} ->
        StInfo;
  