anchor.diff:                      false ->
                           V
                   end,
  -                case lists:keyfind(A, 1, AttributeTypes) of
  -                    {A, AttrType} ->
  -                        {[DBColumn|Attrs], [pack_typed_value(Value, AttrType)|Vals]};
  -                    _ ->
  -                        {[DBColumn|Attrs], [pack_value(Value)|Vals]}
  -                end
  +                {[DBColumn|Attrs], [Value|Vals]}
           end, {[], []}, Record:attributes()),
  -    ["INSERT INTO ", TableName, " (", 
  +    TempList=lists:seq(1,length(Attributes)),
  +    Params= lists:map(fun(E)->"$"++integer_to_list(E) end,TempList),
  +    {["INSERT INTO ", TableName, " (", 
           string:join(Attributes, ", "),
           ") values (",
  -        string:join(Values, ", "),
  +        string:join(Params, ", "),
           ")",
           " RETURNING id"
  -    ].
  +    ],Values}.
   
   build_update_query(Record) ->
       {Type, TableName, IdColumn, Id} = boss_sql_lib:infer_type_from_id(Record:id()),
       AttributeColumns = Record:database_columns(),
  -    AttributeTypes = boss_record_lib:attribute_types(Type),
  -    Updates = lists:foldl(fun
  +    {Attributes, Values} = lists:foldl(fun
               ({id, _}, Acc) -> Acc;
  -            ({A, V}, Acc) -> 
  +            ({A, V}, {Attrs, Vals}) -> 
                   DBColumn = proplists:get_value(A, AttributeColumns),
                   Value = case {boss_sql_lib:is_foreign_key(Type, A), V =/= undefined} of
                       {true, true} ->
  
positive.code:         uuid -> Record:set(id, uuid:to_string(uuid:uuid4()));
          _ -> Record
  end.
  
  integer_to_id(Val, KeyString) ->
      ModelName = string:substr(KeyString, 1, string:len(KeyString) - string:len("_id")),
      ModelName ++ "-" ++ id_value_to_string(Val).
  
  activate_record(Record, Metadata, Type) ->
      AttributeTypes = boss_record_lib:attribute_types(Type),
  
negative.code: escape_sql1([C|Rest], Acc) ->
      escape_sql1(Rest, [C|Acc]).
  
  pack_datetime({Date, {Y, M, S}}) when is_float(S) ->
      pack_datetime({Date, {Y, M, erlang:round(S)}});
  pack_datetime(DateTime) ->
  