def sqlite_sql_search(basedir, sqlstatement, lcclist=None,
    fail_if_sql_invalid=True, incoming_userid=2, incoming_role='anonymous',
    raiseonfail=False, censor_searchargs=False):
    """This runs an arbitrary SQL statement search.

    basedir is the directory where lcc-index.sqlite is located.

    ftsquerystr is string to query against the FTS indexed columns. this is in
    the usual FTS syntax:

    https://www.sqlite.org/fts5.html#full_text_query_syntax

    columns is a list that specifies which columns to return after the query is
    complete.

    conditions is a string in SQL format that applies extra conditions to
    the where statement. This will be parsed and if it contains any non-allowed
    keywords, conditions will be disabled.

   FIXME: this will require an sql parser to do it right.

    """
