Ejemplo n.º 1
0
def delete_beamline_setup(beamline_setup_id):
    """Deletes beamline_setup item from db.

    Args:
        beamline_setup_id (int): beamline_setupId column in db

    Returns:
        bool: True if the beamline_setup exists and deleted successfully,
        otherwise return False
    """
    id_dict = {"beamLineSetupId": beamline_setup_id}
    return db.delete_db_item(models.BeamLineSetup, id_dict)
Ejemplo n.º 2
0
def delete_person(person_id):
    """Deletes person item from db.

    Args:
        person_id (int): personId column in db

    Returns:
        bool: True if the person exists and deleted successfully,
        otherwise return False
    """
    id_dict = {"personId": person_id}
    return db.delete_db_item(models.Person, id_dict)
Ejemplo n.º 3
0
def delete_lab_contact(lab_contact_id):
    """
    Deletes lab contact.

    Args:
        lab_contact_id ([type]): [description]

    Returns:
        [type]: [description]
    """
    id_dict = {"labContactId": lab_contact_id}
    return db.delete_db_item(models.LabContact, id_dict)
Ejemplo n.º 4
0
def delete_sample(sample_id):
    """
    Deletes sample item from db.

    Args:
        sample_id (int): blSampleId column in db

    Returns:
        bool: True if the sample exists and deleted successfully,
        otherwise return False
    """
    id_dict = {"blSampleId": sample_id}
    return db.delete_db_item(models.BLSample, id_dict)
Ejemplo n.º 5
0
def delete_motion_correction(motion_correction_id):
    """
    Deletes motion_correction item from db.

    Args:
        motion_correction_id (int): motion_correctionId column in db

    Returns:
        bool: True if the motion_correction exists and deleted successfully,
        otherwise return False
    """
    id_dict = {"motionCorrectionId": motion_correction_id}
    return db.delete_db_item(models.MotionCorrection, id_dict)
Ejemplo n.º 6
0
def delete_dewar(dewar_id):
    """
    Deletes dewar item from db.

    Args:
        dewar_id (int): dewarId column in db

    Returns:
        bool: True if the dewar exists and deleted successfully,
        otherwise return False
    """
    id_dict = {"dewarId": dewar_id}
    return db.delete_db_item(models.Dewar, id_dict)
Ejemplo n.º 7
0
def delete_shipment(shipment_id):
    """
    Deletes shipment item from db.

    Args:
        shipment_id (int): shipmentId column in db

    Returns:
        bool: True if the shipment exists and deleted successfully,
        otherwise return False
    """
    id_dict = {"shippingId": shipment_id}
    return db.delete_db_item(models.Shipping, id_dict)
Ejemplo n.º 8
0
def delete_proposal(proposal_id):
    """
    Deletes proposal item from db.

    Args:
        proposal_id (int): proposalId column in db

    Returns:
        bool: True if the proposal exists and deleted successfully,
        otherwise return False
    """
    id_dict = {"proposalId": proposal_id}
    return db.delete_db_item(models.Proposal, id_dict)
Ejemplo n.º 9
0
def delete_laboratory(laboratory_id):
    """
    Deletes laboratory item from db.

    Args:
        laboratory_id (int): laboratoryId column in db

    Returns:
        bool: True if the laboratory exists and deleted successfully,
        otherwise return False
    """
    id_dict = {"laboratoryId": laboratory_id}
    return db.delete_db_item(models.Laboratory, id_dict)
Ejemplo n.º 10
0
def delete_robot_action(robot_action_id):
    """
    Deletes robot_action item from db.

    Args:
        robot_action_id (int): robot_actionId column in db

    Returns:
        bool: True if the robot_action exists and deleted successfully,
        otherwise return False
    """
    id_dict = {"robotActionId": robot_action_id}
    return db.delete_db_item(models.RobotAction, id_dict)
Ejemplo n.º 11
0
def delete_crystal(crystal_id):
    """
    Deletes crystal item from db.

    Args:
        crystal_id (int): crystalId column in db

    Returns:
        bool: True if the crystal exists and deleted successfully,
        otherwise return False
    """
    id_dict = {"crystalId": crystal_id}
    return db.delete_db_item(models.Crystal, id_dict)
Ejemplo n.º 12
0
def delete_diffraction_plan(diffraction_plan_id):
    """
    Deletes diffraction_plan item from db.

    Args:
        diffraction_plan_id (int): diffraction_planId column in db

    Returns:
        bool: True if the diffraction_plan exists and deleted successfully,
        otherwise return False
    """
    id_dict = {"diffractionPlanId": diffraction_plan_id}
    return db.delete_db_item(models.DiffractionPlan, id_dict)
Ejemplo n.º 13
0
def delete_beam_calendar(beam_calendar_id):
    """
    Deletes beam_calendar item from db.

    Args:
        beam_calendar_id (int): beam_calendarId column in db

    Returns:
        bool: True if the beam_calendar exists and deleted successfully,
        otherwise return False
    """
    id_dict = {"beamCalendarId": beam_calendar_id}
    return db.delete_db_item(models.BeamCalendar, id_dict)
Ejemplo n.º 14
0
def delete_session(session_id):
    """
    Deletes session item from db.

    Args:
        session_id (int): sessionId column in db

    Returns:
        bool: True if the session exists and deleted successfully,
        otherwise return False
    """
    id_dict = {"sessionId": session_id}
    return db.delete_db_item(models.BLSession, id_dict)
Ejemplo n.º 15
0
def delete_container(container_id):
    """
    Deletes container item from db.

    Args:
        container_id (int): containerId column in db

    Returns:
        bool: True if the container exists and deleted successfully,
        otherwise return False
    """
    id_dict = {"containerId": container_id}
    return db.delete_db_item(models.Container, id_dict)
Ejemplo n.º 16
0
def delete_component_type(component_type_id):
    """
    Deletes component_type item from db.

    Args:
        component_type_id (int): componentTypeId column in db

    Returns:
        bool: True if the component_type exists and deleted successfully,
        otherwise return False
    """
    id_dict = {"componentTypeId": component_type_id}
    return db.delete_db_item(models.ComponentType, id_dict)