Methods and systems for recursive saving of hierarchical objects to a database
First Claim
Patent Images
1. A method at a database system having at least a memory and a processor therein, wherein the method comprises:
- processing a set of records to be committed to the database system;
detecting a fault with a record within the set of records while processing the set of records to be committed to the database system;
performing fault recovery for the record having the fault, including at least;
(i) determining the record having the fault is a parent record which depends from a field value of a child record,(ii) faulting the child record,(iii) identifying resource limitations counted against governor limits used up by processing the set of records including the record having the fault and the faulted child record,(iv) rolling back the identified resource limitations associated with the record having the fault and the faulted child record, and(v) removing the record having the fault and the faulted child record from the set of records to be committed to the database system resulting in subset of the set records to be committed to the database system; and
committing the resulting subset of the set records to be committed to the database system.
1 Assignment
0 Petitions
Accused Products
Abstract
Methods and systems include embodiments that recursively save parent, grandparent, and other records in a database that depend from a record. User-provided code within a save event or trigger can thus call further save methods without corrupting the database. Junction objects, objects that reflect records with two or more parents, can also be recursively saved.
205 Citations
24 Claims
-
1. A method at a database system having at least a memory and a processor therein, wherein the method comprises:
-
processing a set of records to be committed to the database system; detecting a fault with a record within the set of records while processing the set of records to be committed to the database system; performing fault recovery for the record having the fault, including at least; (i) determining the record having the fault is a parent record which depends from a field value of a child record, (ii) faulting the child record, (iii) identifying resource limitations counted against governor limits used up by processing the set of records including the record having the fault and the faulted child record, (iv) rolling back the identified resource limitations associated with the record having the fault and the faulted child record, and (v) removing the record having the fault and the faulted child record from the set of records to be committed to the database system resulting in subset of the set records to be committed to the database system; and committing the resulting subset of the set records to be committed to the database system. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18)
-
-
19. Non-transitory computer readable storage media having instructions stored thereupon that, when executed by a processor of a database system, the instructions cause the database system to perform operations including:
-
processing a set of records to be committed to the database system; detecting a fault with a record within the set of records while processing the set of records to be committed to the database system; performing fault recovery for the record having the fault, including at least; (i) determining the record having the fault is a parent record which depends from a field value of a child record, (ii) faulting the child record, (iii) identifying resource limitations counted against governor limits used up by processing the set of records including the record having the fault and the faulted child record, (iv) rolling back the identified resource limitations associated with the record having the fault and the faulted child record, and (v) removing the record having the fault and the faulted child record from the set of records to be committed to the database system resulting in subset of the set records to be committed to the database system; and committing the resulting subset of the set records to be committed to the database system. - View Dependent Claims (20, 21, 22)
-
-
23. A database system, comprising:
-
a memory; one or more processors; a physical database object to store a plurality of records; and one or more sequences of instructions that when executed cause the one or more processors to; (i) process a set of records to be committed to the database system; (ii) detect a fault with a record within the set of records while processing the set of records to be committed to the database system; (iii) perform fault recovery for the record having the fault via (a) instructions to determine the record having the fault is a parent record which depends from a field value of a child record, (b) instructions to fault the child record, (c) instructions to identify resource limitations counted against governor limits used up by processing the set of records including the record having the fault and the faulted child record, (d) instructions to roll back the identified resource limitations associated with the record having the fault and the faulted child record, and (e) instructions to remote the record having the fault and the faulted child record from the set of records to be committed to the database system resulting in subset of the set records to be committed to the database system, and (iv) commit the resulting subset of the set records to be committed to the database system. - View Dependent Claims (24)
-
Specification