Skip to content

Conversation

@bchoudhary6415
Copy link
Collaborator

This PR addresses issue #187 and enables SQLAlchemy statement cache support for the Db2 SQLAlchemy dialect (ibm_db_sa).
The change refactors LIMIT / OFFSET SQL compilation to ensure that:

  • Compiled SQL strings are stable and reusable
  • Bind parameters and post-compile parameters are preserved
  • SQL text is not dependent on runtime values
  • OFFSET-only queries are safely rewritten using ROW_NUMBER() while remaining cache-friendly
    As a result, the dialect can safely advertise:
supports_statement_cache = True

For more info related to it, please go through below documentation links of SQLAlchemy

Signed-off-by: Balram Choudhary <bchoudhary@rocketsoftware.com>
@bimalkjha bimalkjha merged commit 25a1f67 into ibmdb:master Dec 15, 2025
3 checks passed
@bchoudhary6415 bchoudhary6415 deleted the ibmdbsa_issue branch December 16, 2025 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants