def query(
            self,
            select_column_names,
            filter_column,
            filter_value,
            feature,
            distinct=False,
            required=False):
        """
        Construct a SQL query and run against the sqlite3 database,
        filtered both by the feature type and a user-provided column/value.
        """
        sql = """
            SELECT %s%s
            FROM %s
            WHERE %s = ?
        """ % ("distinct " if distinct else "",
               ", ".join(select_column_names),
               feature,
               filter_column)
        query_params = [filter_value]
        return self.run_sql_query(
            sql, required=required, query_params=query_params)
def query ( self , select_column_names , filter_column , filter_value , feature , distinct = False , required = False ) : sql = """
            SELECT %s%s
            FROM %s
            WHERE %s = ?
        """ % ( "distinct " if distinct else "" , ", " . join ( select_column_names ) , feature , filter_column ) query_params = [ filter_value ] return self . run_sql_query ( sql , required = required , query_params = query_params )
Construct a SQL query and run against the sqlite3 database,
        filtered both by the feature type and a user-provided column/value.