sunpeek.db_utils.crud.create_component#

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

Add a new 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.