mssql dialect omits limit/offset wrapping on second compile; alters the statement

Issue #2545 resolved
Former user created an issue

In MSSQL When doing a query such as:

            qry = select([nemsis_model.Nemsis.table](nemsis_model.Nemsis.table), order_by=[nemsis_model.Nemsis.patient_care_report_number](nemsis_model.Nemsis.ems_agency_number,),limit = limit,offset=offset)

Evaluating the query twice causes it to drop the limit and offset on the second evaluation

An easy way to show what I suspect is happening is if I log the qry twice:

        log.info(qry)
        log.info(qry)

The second case will not display the constraints on record_number.

This took a while to track down as I was trying to do a select and not getting why the results of my select differed from the logging I did right before it.

Comments (3)

  1. Log in to comment