def get_int_type(x):
    """
    Given an integer value, determine which the least autoSql type
    that suits it.

    :param x: an integer value
    :type x: int
    :return: an autoSql type for the specified value
    :rtype: str
    """
    if x < 0:
        if -pow(2, 7) - 1 < x < pow(2, 7):
            return 'byte'
        elif -pow(2, 15) - 1 < x < pow(2, 15):
            return 'short'
        elif -pow(2, 31) - 1 < x < pow(2, 31):
            return 'int'
    elif x < pow(2, 8):
        if x < pow(2, 7):
            return 'byte'
        else:
            return 'ubyte'
    elif x < pow(2, 16):
        if x < pow(2, 15):
            return 'short'
        else:
            return 'ushort'
    elif x < pow(2, 32):
        if x < pow(2, 31):
            return 'int'
        else:
            return 'uint'
    return None
