anchor.diff:      " WHERE ", escape(atom_to_list(sumo:field_name(sumo:get_id_field(DocName)))),
       "=? LIMIT 1"
     ],
  -  case execute(Sql, [Id], State) of
  +  prepare(delete, Sql),
  +  case execute(delete, [Id], State) of
       #ok_packet{affected_rows = NumRows} -> {ok, NumRows > 0, State};
       Error -> evaluate_execute_result(Error, State)
     end.
   
   delete_all(DocName, State) ->
     Sql = ["DELETE FROM ", escape(atom_to_list(DocName))],
  -  case execute(Sql, State) of
  +  prepare(delete_all, Sql),
  +  case execute(delete_all, State) of
       #ok_packet{affected_rows = NumRows} -> {ok, NumRows, State};
       Error -> evaluate_execute_result(Error, State)
     end.
  
positive.code:       ColumnDqls
      ), ",")
    ],
    emysql:prepare(insert_stmt, list_to_binary(Dql)),
    case execute(Dql, lists:append(ColumnValues, ColumnValues), State) of
      #ok_packet{insert_id = InsertId} ->
        % XXX TODO darle una vuelta mas de rosca
        % para el manejo general de cuando te devuelve el primary key
  
negative.code:     NewDoc#sumo_doc.fields
    ),
  
    Sql = [
      "INSERT INTO ", escape(atom_to_list(DocName)), " (",
      string:join(ColumnDqls, ","), ")",
      " VALUES (", string:join(ColumnSqls, ","), ")",
  