Skip to content

Update select-data.md #469

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Update select-data.md #469

wants to merge 2 commits into from

Conversation

Daydah
Copy link

@Daydah Daydah commented May 19, 2025

User description

Added the warning about Joomla's default query limit and a workaround on how to disable it in the Model, if need be.

Long story: This was as a result of a challenge I just faced for a component that had its own novel way of displaying data using glossary-type structure. This update worked and might help someone (me) in future


PR Type

documentation


Description

  • Added a developer warning about Joomla's default query limit.

  • Provided a code example to disable list limit in models.

  • Explained how to retrieve all rows by setting list.limit to 0.


Changes walkthrough 📝

Relevant files
Documentation
select-data.md
Document Joomla's default list limit and how to disable it

versioned_docs/version-5.3/general-concepts/database/select-data.md

  • Added a warning box explaining Joomla's default list limit.
  • Included a code snippet to set list.limit to 0 in models.
  • Clarified how to disable pagination and retrieve all rows.
  • +13/-0   

    Need help?
  • Type /help how to ... in the comments thread for any questions about Qodo Merge usage.
  • Check out the documentation for more information.
  • Added the warning about Joomla's default query limit and a workaround on how to disable it in the Model, if need be.
    Copy link
    Contributor

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ No major issues detected

    Copy link
    Contributor

    qodo-merge-pro bot commented May 19, 2025

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Impact
    General
    Warn about performance implications

    Setting list.limit to 0 can cause performance issues with large datasets.
    Consider adding a warning about potential memory consumption and server load
    when retrieving all records without pagination.

    versioned_docs/version-5.3/general-concepts/database/select-data.md [114-115]

    -// Set limit to 0 to show all items
    +// Set limit to 0 to show all items (use with caution on large datasets)
     $this->setState('list.limit', 0);
    • Apply / Chat
    Suggestion importance[1-10]: 6

    __

    Why: Adding a cautionary comment about performance when disabling pagination is a helpful reminder for developers, especially when working with large datasets. While not critical, it improves code clarity and helps prevent potential misuse.

    Low
    • Update

    @HLeithner
    Copy link
    Member

    Hi,

    thanks for the note, but I think that's the wrong place, it should go somewhere at the
    https://manual.joomla.org/docs/building-extensions/components/

    But I didn't found an Explanation about how the list model works at the first look, we also need the component creation tutorial...

    Would be great if you like to do bigger task? We have 2 simple extensions but the full process is still missing, at https://docs.joomla.org/J4.x:Developing_an_MVC_Component/Introduction is the old documentation about this topic.

    @Daydah
    Copy link
    Author

    Daydah commented May 19, 2025

    Hi HLeithner,
    Thanks for the comment.

    thanks for the note, but I think that's the wrong place, it should go somewhere at the https://manual.joomla.org/docs/building-extensions/components/

    I agree with your thoughts, however, I could find no direct spot to place this under the components section you highlighted. The next best place was right here, where anyone who might have the need can find it.

    But I didn't found an Explanation about how the list model works at the first look, we also need the component creation tutorial...

    I agree with you. The tutorials for the list model and component creation are very important. I had to scour the whole internet and do a lot of trial and error to make things work in J5.

    Would be great if you like to do bigger task? We have 2 simple extensions but the full process is still missing, at https://docs.joomla.org/J4.x:Developing_an_MVC_Component/Introduction is the old documentation about this topic.

    Yes, I will love to jump in on bigger tasks. I will tackle that next.

    @HLeithner
    Copy link
    Member

    Great, I think you can close this PR since it doesn't make sense to place it here. An example could be #261

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    2 participants