def clear_all ( self ) : logger . info ( "Clearing ALL Labels and LabelKeys." ) self . session . query ( Label ) . delete ( synchronize_session = "fetch" ) self . session . query ( LabelKey ) . delete ( synchronize_session = "fetch" )
python sqlalchemy delete all rows
Delete all Labels .
def clear_all(self):
        """Delete all Labels."""
        logger.info("Clearing ALL Labels and LabelKeys.")
        self.session.query(Label).delete(synchronize_session="fetch")
        self.session.query(LabelKey).delete(synchronize_session="fetch")