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
ofa subclass
ofcmp.Component
)commit (
whether
tocommit the new components
,if set
tofalse
,session.commit() must be called later.
)
- Return type:
The updated object after commit
tothe database. This may have had modifications made by database side logic.