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 instanceofa subclassofcmp.Component)commit (
whethertocommit the new components,if settofalse,session.commit() must be called later.)
- Return type:
The updated object after committothe database. This may have had modifications made by database side logic.