def addParam(baseLength: int, sqlBase, sqlToAdd, separator: str = ", "):
    """concatenates text with separator if the text length is longer than specified"""
    if len(sqlBase) > baseLength:
        sqlBase += separator
    return sqlBase + sqlToAdd