For example I have a loop that will execute an INSERT on each iteration.
Assuming data model is : "isTitle", "content", "parent_id"
The input data is a list of title and paragraphs.
I want to store them in the above data model while keeping their relationships to each other (only the parent_id).
For example, the first iterated node is a title, its parent_id is NULL because it's the first title of the document.
The second element is a paragraphe, so isTitle is NULL, but parent_id should be the ID of the last iterated title.
How do I get that ID value given the fact that the whole process is happening in a loop ?