pycram.orm.logging_hooks
========================

.. py:module:: pycram.orm.logging_hooks


Functions
---------

.. autoapisummary::

   pycram.orm.logging_hooks.insert


Module Contents
---------------

.. py:function:: insert(plan: pycram.plan.Plan, session: sqlalchemy.orm.Session, use_progress_bar: bool = True, progress_bar: typing_extensions.Optional[tqdm.tqdm] = None)

   Insert a plan into the database. Inserts all nodes and edges from the given plan into the database if the nodes and
   associated designators are present in the ORM model. Otherwise, check the genereate_orm.py file in scrip/ and the
   model.py file for explicitly mapped classes.

   :param plan: Plan to be inserted into the database.
   :param session: Session object for database interaction.
   :param use_progress_bar: If True, a progress bar will be displayed during the insertion process.
   :param progress_bar: Optional progress bar object. If not provided, a new one will be created.


