Created
June 12, 2015 14:38
-
-
Save vtkstef/666f9fd6f4f0ae8fd653 to your computer and use it in GitHub Desktop.
separate fragment batches
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public long run(int orderid, int count, double billing_amount, String message) throws VoltAbortException { | |
VoltTable[] queryresults; | |
for (int i=0; i < count; i++) | |
{ | |
voltQueueSQL(InsertOrderItemExport, orderid * 100 + i, orderid, "ProductID", message, billing_amount, billing_amount); | |
} | |
voltQueueSQL(InsertOrderExport, orderid, "SALES_CHANNEL", "STATUS123456", "Rs", billing_amount, 1, message); | |
queryresults = voltExecuteSQL(); | |
for (int i=0; i < count; i++) | |
{ | |
voltQueueSQL(InsertOrderItem, orderid * 100 + i, orderid, "ProductID", message, billing_amount, billing_amount); | |
} | |
voltQueueSQL(InsertOrder, orderid, "SALES_CHANNEL", "STATUS123456", "Rs", billing_amount, 1, message); | |
queryresults = voltExecuteSQL(true); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment