sunpeek.db_utils.crud.update_component#

sunpeek.db_utils.crud.update_component(session, component, commit=True)#

Updates a component to the database.

Parameters:
  • session (Session)

  • component (An instance of a subclass of cmp.Component)

  • commit (whether to commit the new components, if set to false, session.commit() must be called later.)

Return type:

The updated object after commit to the database. This may have had modifications made by database side logic.