def _whereClauseSql(**whereClauses):
    """
    Takes parsed search query parameters,
    produces equivalent SQL 'where' clause.

    :param whereClauses: key-value pairs of column names to limit by,
        and values to limit them to.
    :return: corresponding SQLite 'where' clause string ready to paste
        into query.
    """
    if whereClauses is not None:
        # wc is an array of "key ='value'" strings from whereClauses,
        # with all entries where value = None removed.
        wc = ["{} = '{}'".format(k, whereClauses[k])
              for k in whereClauses.keys()
              if whereClauses[k] is not None]
        if len(wc) > 0:
            return " WHERE " + " AND ".join(wc)
    else:
        return ""