Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improving limit method using LIMIT,OFFSET #393

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ushiday
Copy link

@ushiday ushiday commented Nov 24, 2023

To improve #391 , I would like to suggest a code that uses LIMIT,OFFSET. This method is supported in recent DB2 versions, is consistent with other database software, and is simple.
However, this method is not available to older version DB2 users. (I think I'm in the minority now...)

@alanseiden
Copy link

@ushiday Thank you for posting these fixes. I prefer the LIMIT and OFFSET approach as a more modern one that is easier to understand.
Observations:

  • LIMIT and OFFSET have been available in IBM i Db2 since 2016 with IBM i 7.1 TR11 and IBM i 7.2 TR3.
  • The oldest supported operating system release is now IBM i 7.3.
  • ZF1-Future was created to help people upgrade to new versions of PHP. Those new PHP versions could not run on IBM i 7.1 and older anyway.
  • Anyone running an old OS without LIMIT and OFFSET can stay with their old ZF1 version.

@develart-projects
Copy link
Collaborator

develart-projects commented Nov 28, 2023

Any possibility to add DB version check, please? Any not backward compatible changes are a bit harder to approve.
If we can split the logic, based on the DB version, we are good to go imo.

@alanseiden
Copy link

We should find out when LIMIT+OFFET were added to LUW (Linux/Unix/Windows) Db2 as well.

@ushiday
Copy link
Author

ushiday commented Nov 29, 2023

If it is necessary to take into account the DB2 old version, Improving limit method using OVER() #392
Is that a better solution?

@develart-projects
Copy link
Collaborator

develart-projects commented Jan 26, 2024

Still thinking about this one. I have no idea about DB2, but still. I can feel the pain of some older corporate (hi banks) DB system admins, trying to upgrade and start to fail DB stuff. That's why I'm asking, if there is any possibility to split codebase, based on the connection/driver/etc. If not, I would most probably suggest to go forward with older approach.

@develart-projects develart-projects marked this pull request as draft January 26, 2024 10:01
@develart-projects develart-projects self-requested a review January 26, 2024 10:01
@develart-projects develart-projects added the discussion topic is discussed before any action taken label Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion topic is discussed before any action taken
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants