|
17 | 17 | - Removed `bulkQuery()` function in favor of `bulk1.query()` and |
18 | 18 | `bulk2.query()` |
19 | 19 |
|
20 | | - # Migration Guide |
| 20 | +#### Migration Guide |
21 | 21 |
|
22 | | - The legacy `bulk()` and `bulkQuery()` functions have been replaced with |
23 | | - `bulk1` and `bulk2` APIs that provide better control and clarity: |
| 22 | +The legacy `bulk()` and `bulkQuery()` functions have been replaced with `bulk1` |
| 23 | +and `bulk2` APIs that provide better control and clarity: |
24 | 24 |
|
25 | | - ## Bulk Operations |
| 25 | +##### Bulk Operations |
26 | 26 |
|
27 | | - **Before:** |
| 27 | +**Before:** |
28 | 28 |
|
29 | | - ````javascript |
30 | | - bulk('Account', 'insert', records, options); |
31 | | - bulk('Account', 'update', records, options); |
32 | | - bulk('Account', 'upsert', records, { extIdField: 'Id__c' }); |
33 | | - bulk('Account', 'delete', records, options); |
34 | | - ``` |
35 | | - **After:** |
| 29 | +```javascript |
| 30 | +bulk('Account', 'insert', records, options); |
| 31 | +bulk('Account', 'update', records, options); |
| 32 | +bulk('Account', 'upsert', records, { extIdField: 'Id__c' }); |
| 33 | +bulk('Account', 'delete', records, options); |
| 34 | +``` |
| 35 | + |
| 36 | +**After:** |
36 | 37 |
|
37 | | - ```javascript |
38 | | - // Bulk API 1.0 - More reliable, supports failOnError |
39 | | - bulk1.insert('Account', records, { failOnError: true }); |
40 | | - bulk1.update('Account', records, { batchSize: 5000 }); |
41 | | - bulk1.upsert('Account', 'Id__c', records); |
42 | | - bulk1.destroy('Account', records); |
| 38 | +```javascript |
| 39 | +// Bulk API 1.0 - More reliable, supports failOnError |
| 40 | +bulk1.insert('Account', records, { failOnError: true }); |
| 41 | +bulk1.update('Account', records, { batchSize: 5000 }); |
| 42 | +bulk1.upsert('Account', 'Id__c', records); |
| 43 | +bulk1.destroy('Account', records); |
43 | 44 |
|
44 | | - // Bulk API 2.0 - Faster performance, simplified error handling |
45 | | - bulk2.insert('Account', records); |
46 | | - bulk2.update('Account', records); |
47 | | - bulk2.upsert('Account', 'Id__c', records); |
48 | | - bulk2.destroy('Account', records); |
49 | | - ```` |
| 45 | +// Bulk API 2.0 - Faster performance, simplified error handling |
| 46 | +bulk2.insert('Account', records); |
| 47 | +bulk2.update('Account', records); |
| 48 | +bulk2.upsert('Account', 'Id__c', records); |
| 49 | +bulk2.destroy('Account', records); |
| 50 | +``` |
50 | 51 |
|
51 | | - ### Bulk Queries |
| 52 | +##### Bulk Queries |
52 | 53 |
|
53 | | - **Before** |
| 54 | +**Before** |
54 | 55 |
|
55 | | - ```js |
56 | | - bulkQuery('select Id, Name from Account'); |
57 | | - ``` |
| 56 | +```js |
| 57 | +bulkQuery('select Id, Name from Account'); |
| 58 | +``` |
58 | 59 |
|
59 | | - **After** |
| 60 | +**After** |
60 | 61 |
|
61 | | - ```js |
62 | | - bulk1.query('select Id, Name from Account'); |
63 | | - // or |
64 | | - bulk2.query('select Id, Name from Account'); |
65 | | - ``` |
| 62 | +```js |
| 63 | +bulk1.query('select Id, Name from Account'); |
| 64 | +// or |
| 65 | +bulk2.query('select Id, Name from Account'); |
| 66 | +``` |
66 | 67 |
|
67 | 68 | ### Patch Changes |
68 | 69 |
|
|
0 commit comments