anchor.diff:      q(SQL),
       KeyValue.
   
  -%% proplist query
  -plq(Q) ->
  -    Db = db(),
  -    db_q(proplist,Db,Q).
  -
  -plq(Q,ParamList) ->
  -    Db = db(),
  -    db_q(proplist,Db,Q,ParamList).
  -
  -%% dict query
  -dq(Q) ->
  -    Db = db(),
  -    db_q(dict,Db,Q).
  -
  -dq(Q,ParamList) ->
  -    Db = db(),
  -    db_q(dict,Db,Q,ParamList).
  -
  -%% tuple query
  -tq(Q) ->
  -    Db = db(),
  -    db_q(tuple,Db,Q).
  -
  -tq(Q,ParamList) ->
  -    Db = db(),
  -    db_q(tuple,Db,Q,ParamList).
  -
  -format_result(Type,Res) ->
  -    Json = emysql_util:as_json(Res),
  -    case Type of
  -        list ->
  -            format_list_result(Json);
  -        tuple ->
  -            format_tuple_result(Json);
  -        proplist ->
  -            format_proplist_result(Json);
  -        dict ->
  -            format_dict_result(Json)
  -    end.
  -
  -format_value(null) ->
  -    undefined;
  -format_value(V) when is_binary(V) ->
  -    binary_to_list(V);
  -format_value(V) ->
  -    V.
  -
  -format_key(K) when is_atom(K) ->
  -    K;
  -format_key(K) when is_binary(K) ->
  -    format_key(binary_to_list(K));
  -format_key(K) when is_list(K) ->
  -    list_to_atom(K).
  -
  -format_list_result(Json) ->
  -    [
  -        [format_value(Value) || {_,Value} <- Row]
  -    || Row <- Json].
  -
  -format_tuple_result(Json) ->
  -    [list_to_tuple(Row) || Row <- format_list_result(Json)].
  -
  -format_proplist_result(Json) ->
  -    [
  -        [{format_key(F), format_value(V)} || {F,V} <- Row]
  -    || Row <-Json].
  -
  -format_dict_result(Json) ->
  -    [dict:from_list(PL) || PL <- format_proplist_result(Json)].
  -
  -%% Query from the specified Database pool (Db)
  -%% This will connect to the specified Database Pool
  -%% Type must be atoms: proplist, dict, list, or tuple
  +-spec db_q(Type :: return_type(), Db :: db(), Q :: sql()) ->  insert_id() 
  +                                                            | update_id()
  +                                                            | [list() | dict() | tuple() | proplist()].
  +%% @doc Query from the specified Database pool (Db) This will connect to the
  +%% specified Database Pool Type must be atoms: proplist, dict, list, or tuple
   %% Type can also be atom 'insert' in which case, it'll return the insert value
  -
   db_q(Type,Db,Q) ->
       try 
           Res = emysql:execute(Db,Q),
  
positive.code:     SQL = ["insert into ",Table," set ",Set],
      qi(SQL).
  
  %% Updates a row from the proplist based on the key `Table ++ "id"` in the Table
  plu(Table,PropList) when is_atom(Table) ->
      plu(atom_to_list(Table),PropList);
  plu(Table,PropList) ->
      KeyField = list_to_atom(Table ++ "id"),
      plu(Table,KeyField,PropList).
  
  plu(Table,KeyField,InitPropList) when is_atom(Table) ->
      plu(atom_to_list(Table),KeyField,InitPropList);
  plu(Table,KeyField,InitPropList) ->
  
negative.code: -type insert_id()   :: term().
  -type update_id()   :: term().
  -type proplist()    :: {atom() | value()}.
  -type return_type() :: dict | list | proplist | tuple.
  
  -spec get_env(Var :: atom(), Def :: term()) -> term().
  get_env(Var, Def) ->
  