def get_trigger_db_by_uid(uid):
    """
    Returns the trigger object from db given a trigger uid.

    :param ref: Reference to the trigger db object.
    :type ref: ``str``

    :rtype: ``object``
    """
    try:
        return Trigger.get_by_uid(uid)
    except StackStormDBObjectNotFoundError as e:
        LOG.debug(
            'Database lookup for uid="%s" resulted in exception : %s.',
            uid,
            e,
            exc_info=True,
        )

    return None

    Returns the trigger object from db given a trigger uid.

    :param ref: Reference to the trigger db object.
    :type ref: ``str``

    :rtype: ``object``
    
st2common/st2common/services/triggers.py