| 1 | [[PageOutline]] |
| 2 | |
| 3 | This page is an FDO Code Snippet. Visit the CodeSnippets page to view more! |
| 4 | |
| 5 | = Testing support for batch insert = |
| 6 | |
| 7 | Using a batched IInsert is a more efficent method of bulk feature insertion instead of using a regular IInsert. For providers like KingOracle, batched inserts can be up to 10x faster than regular inserts. |
| 8 | |
| 9 | Unfortunately there is currently no capability API to determine if a given provider supports batch insertion. The best (albeit hacky) way to determine if using a batched insert is possible is to check if the !BatchParameterValues property is null or not. |
| 10 | |
| 11 | == C# Example == |
| 12 | |
| 13 | {{{ |
| 14 | #!cpp |
| 15 | |
| 16 | static bool SupportsBatchInsertion(IInsert insertCmd) |
| 17 | { |
| 18 | return insertCmd.BatchParameterValues != null; |
| 19 | } |
| 20 | |
| 21 | }}} |
| 22 | |