(session, db_kb, ident, cfg_model)
:param session:
        :param DbKnowledgeBase db_kb:   The database object for KnowledgeBase.
        :param str ident:               Identifier of the CFG model.
        :param CFGModel cfg_model:      The CFG model to dump.
        :return:                        None
def dump(session, db_kb, ident, cfg_model):
        """

        :param session:
        :param DbKnowledgeBase db_kb:   The database object for KnowledgeBase.
        :param str ident:               Identifier of the CFG model.
        :param CFGModel cfg_model:      The CFG model to dump.
        :return:                        None
        """

        db_cfg_id = session.query(DbCFGModel.id).filter_by(ident=ident).scalar()
        if db_cfg_id is not None:
            # remove the existing CFG
            session.query(DbCFGModel).filter_by(id=db_cfg_id).delete()

        db_cfg = DbCFGModel(
            kb=db_kb,
            ident=ident,
            blob=cfg_model.serialize(),
        )
        session.add(db_cfg)
def dump ( session , db_kb , ident , cfg_model ) : db_cfg_id = session . query ( DbCFGModel . id ) . filter_by ( ident = ident ) . scalar ( ) if db_cfg_id is not None : # remove the existing CFG session . query ( DbCFGModel ) . filter_by ( id = db_cfg_id ) . delete ( ) db_cfg = DbCFGModel ( kb = db_kb , ident = ident , blob = cfg_model . serialize ( ) , ) session . add ( db_cfg )