Methods and systems for bulk row save logic in an object relational mapping layer and application framework
First Claim
Patent Images
1. A method performed in a host system having a database therein to store rows and a processor to execute operations, wherein the method comprises:
- saving a plurality of rows in the database as a set of rows, wherein one or more of the plurality of rows is associated with at least one side effect that is triggered to execute prior to saving or after saving but prior to committing the one or more rows, and wherein the one or more side effects comprises at least one of a pre-operation trigger, a post-operation trigger, or a code snippet;
determining that one or more faults has occurred in saving the set of rows in the database;
rolling back the set of rows to a known start state;
rolling back any side effects that were permitted to execute;
rolling back any resource usage counted against governor limits by executing side effects;
forming a new set of rows at the known start state including any of the plurality of rows which are not associated with the one or more faults having occurred when saving the set of rows in the database by removing all rows associated with the one or more faults during the saving of the set of rows in the database;
saving the new set of rows in the database from the known start state without fault; and
updating resources used and checking against governor limits.
1 Assignment
0 Petitions
Accused Products
Abstract
In accordance with embodiments, there are provided mechanisms and methods for saving multiple rows together through an object relational mapping layer to a database. These mechanisms and methods for saving multiple rows together can enable embodiments to detect faults in the save operation(s) and recover. The ability of embodiments to detect faults in the save operation(s) and recover can enable embodiments to provide a robust forgiving published API that saves a set of rows together whenever possible.
202 Citations
20 Claims
-
1. A method performed in a host system having a database therein to store rows and a processor to execute operations, wherein the method comprises:
-
saving a plurality of rows in the database as a set of rows, wherein one or more of the plurality of rows is associated with at least one side effect that is triggered to execute prior to saving or after saving but prior to committing the one or more rows, and wherein the one or more side effects comprises at least one of a pre-operation trigger, a post-operation trigger, or a code snippet; determining that one or more faults has occurred in saving the set of rows in the database;
rolling back the set of rows to a known start state;rolling back any side effects that were permitted to execute; rolling back any resource usage counted against governor limits by executing side effects; forming a new set of rows at the known start state including any of the plurality of rows which are not associated with the one or more faults having occurred when saving the set of rows in the database by removing all rows associated with the one or more faults during the saving of the set of rows in the database; saving the new set of rows in the database from the known start state without fault; and updating resources used and checking against governor limits. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14)
-
-
15. Non-transitory machine-readable storage media having instructions stored thereupon that, when executed by a processor of a host system, the instructions cause the host organization to perform operations including:
-
saving a plurality of rows in a database as a set of rows, wherein one or more of the plurality of rows is associated with at least one side effect that is triggered to execute prior to saving or after saving but prior to committing the one or more rows, and wherein the one or more side effects comprises at least one of a pre-operation trigger, a post-operation trigger, or a code snippet; determining that one or more faults has occurred in saving the set of rows in the database; rolling back the set of rows to a known start state; rolling back any side effects that were permitted to execute; rolling back any resource usage counted against governor limits by executing side effects; forming a new set of rows at the known start state including any of the plurality of rows which are not associated with the one or more faults having occurred when saving the set of rows in the database by removing all rows associated with the one or more faults during the saving of the set of rows in the database; saving the new set of rows in the database from the known start state without fault; and updating resources used and checking against governor limits. - View Dependent Claims (16, 17)
-
-
18. A host system comprising:
-
a processor to execute operations; a database to store rows; a network interface communicably connecting the host system with user interface devices via a network; and one or more stored sequences of instructions which, when executed by the processor, cause the processor to perform operations comprising; saving a plurality of rows in the database as a set of rows, wherein one or more of the plurality of rows is associated with at least one side effect that is triggered to execute prior to saving or after saving but prior to committing the one or more rows, and wherein the one or more side effects comprises at least one of a pre-operation trigger, a post-operation trigger, or a code snippet; determining that one or more faults has occurred in saving the set of rows in the database; rolling back the set of rows to a known start state; rolling back any side effects that were permitted to execute; rolling back any resource usage counted against governor limits by executing side effects; forming a new set of rows at the known start state including any of the plurality of rows which are not associated with the one or more faults having occurred when saving the set of rows in the database by removing all rows associated with the one or more faults during the saving of the set of rows in the database; saving the new set of rows in the database from the known start state without fault; and updating resources used and checking against governor limits. - View Dependent Claims (19, 20)
-
Specification