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

HBW-80 Limit on the number of choices in lookup select #194

Merged
merged 1 commit into from
Nov 6, 2018

Conversation

mxsmirnoff
Copy link
Contributor

No description provided.

Copy link
Contributor

@sugarfree1 sugarfree1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'd like to limit results in query like before to prevent:

  • fetching many rows from DB;
  • instantiating many objects for unnecessary items.

You need to pass MAX_ROW_COUNT deeper to loader and cut result set just after filtering.

@mxsmirnoff mxsmirnoff force-pushed the HBW-80 branch 2 times, most recently from 2552088 to e78a34d Compare November 1, 2018 07:21
@mxsmirnoff
Copy link
Contributor Author

Updated

@@ -1,7 +1,7 @@
module HBW
module Sources
class Activiti < Base
def select(variable_name, variables)
def select(variable_name, variables, limit = nil)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you don't use it then rename variable to _

@mxsmirnoff mxsmirnoff force-pushed the HBW-80 branch 2 times, most recently from 86f8b6b to 73e4109 Compare November 2, 2018 16:10
@mxsmirnoff
Copy link
Contributor Author

Updated

@hydra-billing-robot hydra-billing-robot merged commit f875e9f into master Nov 6, 2018
@hydra-billing-robot hydra-billing-robot deleted the HBW-80 branch November 6, 2018 07:15
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.

3 participants