def METHOD_NAME(self):
    """Add the Template object to the database."""
    try:
        Database.db_session.METHOD_NAME(self)
        Database.db_session.commit()
    except Exception as e:
        Database.db_session.rollback()
        raise decode_sql_error(
            e,
            on_duplicate=TemplateDuplicate,
            on_null=TemplateMissingParameter,
            fallback=TemplateSqlError,
            operation="add",
            name=self.name,
        ) from e