[Activesfdc-news] Full support for boxcar'ed requests using Rails transaction semantics is in ASF 0.3.2
Doug Chasman
dchasman at salesforce.com
Sat Feb 25 12:48:20 EST 2006
Full support for boxcar'ed requests using Rails transaction semantics is in ASF 0.3.2, e.g.:
def test_batch_insert
c1 = Contact.new(:first_name => 'FN1', :last_name => 'LN1')
c2 = Contact.new(:first_name => 'FN2', :last_name => 'LN2')
c3 = Contact.new(:first_name => 'FN3', :last_name => 'LN3')
Contact.transaction(c1, c2) do
c1.save
c2.save
end
c3.save
c1.first_name << '_2'
c2.first_name << '_2'
c3.first_name << '_2'
Contact.transaction(c1, c2) do
c1.save
c2.save
end
Contact.transaction(c1, c2) do
c3.save
c3.destroy
c2.destroy
c1.destroy
end
end
end
ASF boxcar support automatically homogenizes requests based on the salesforce.com api verb (e.g. :create, :update, :delete) and will automatically break sets larger than the salesforce.com api's max per batch (the limit is currently 200 rows per request) into multiple requests! This is fully operational for insert, update, and delete.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/activesfdc-news/attachments/20060225/a39f943a/attachment.htm
More information about the Activesfdc-news
mailing list