'Prepare a new sql query.
Args:
querystr: String to prepare query from.
forward_only: Optimization for queries that will only step forward.
Must be false for completion queries.'

def __init__(self, querystr, forward_only=True):

    super().__init__(QSqlDatabase.database())
    log.sql.debug('Preparing    SQL    query:    "{}"'.format(querystr))
    if (not self.prepare(querystr)):
        raise SqlException('Failed    to    prepare    query    "{}":    "{}"'.format(querystr, self.lastError().text()))
    self.setForwardOnly(forward_only)
