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

Changing max_records_returned doesn't have any effect on returned data #20

Closed
alexarraiza opened this issue Dec 24, 2015 · 10 comments
Closed

Comments

@alexarraiza
Copy link

Hi,

I'm working with dreamfactory 2.0.1. When querying a SQL Server through the API, it only returns 1000 records. Searching online we found that you can change the maximum number of returned records in config/df.php modifying the following line:
'max_records_returned' => env('DF_DB_MAX_RECORDS_RETURNED', 1000),
but if we modify that to 4000, we still get 1000 records.

We then found the .env file and tried uncommenting and editing this line:
##DF_DB_MAX_RECORDS_RETURNED=1000
to something higher, but it didn't work.

Oh, and we also tried decreasing the value to something like 500 on both files and it still returned 1000.

So now what? Is it even possible to change the number of returned records or will it always be 1000 per query?

Thank you!

@df-arif
Copy link
Contributor

df-arif commented Dec 24, 2015

Please try clearing the system cache. Admin console -> config -> cache -> Flush system wide cache.

@drewpearce
Copy link

This is a bug that was resolved in the 2.0.3 release. You should update your installation. Instructions are available on http://wiki.dreamfactory.com

@alexarraiza
Copy link
Author

Thank you!

@esval
Copy link

esval commented Jan 19, 2016

Hello!

I'm working with dreamfactory 2.0.3 and when I query a SQL Server through the API always returns the first 1000 records . As alexarraiza , I modified the following line entering 4000 as the value of config / df.php file without success.

'max_records_returned' => env('DF_DB_MAX_RECORDS_RETURNED', 4000),

I also modified and uncommented this line of .env and .env-dis files without any apparent result.

DF_DB_MAX_RECORDS_RETURNED=4000

After each change I cleaned the system cache to apply the changes . I 've also tried to restart the entire server without success. Could you tell me if I'm missing something or if I'm missing something ?

thanks!!

@drewpearce
Copy link

you should only have to change the value in the .env file.
After you make changes to your .env file you need to run php artisan cache:clear in the the main directory (the directory where the .env file is.)
Then restart the web server processes.

@esval
Copy link

esval commented Jan 19, 2016

Thank you for responding drewpearce ,

I tried to do just as you said , leaving config / df.php and .env -dist as originally , running php artisan cache: clear and restarting server processes , but the problem remains .

Any idea why it keeps happening ?

@drewpearce
Copy link

Best guess would be that your update wasn't fully successful. When you perform the upgrade, composer pulls in specific versions of many repositories. I'd check the repos for df-core and df-sqldb to see if they are up to date. (vendor/dreamfactory/df-core, vendor/dreamfactory/df-sqldb)
You can check the changelog file in each to see what version it is.
For DreamFactory 2.0.4, df-core should be on 0.1.12, and df-sqldb should be on 0.1.4.
If you find this is not the case, you need to repeat the update process, outlined here:
Upgrade Bitnami
Upgrade Manual Install

@alexarraiza
Copy link
Author

Thank you very much drewpearce, now we can set any value we want and it returns that amount, but we encountered a different problem :(

When we use more than one filter as "FIELD_1 = '%' AND FIELD_2 = '%'" it doesn't give us any results (before upgrading it returned data, and the data itself hasn't changed), but when we user only one ("FIELD_1 = '%'") it works fine.

We had to upgrade manually df-core and df-sqldb as they were not upgraded when we updated the whole dreamfactory, maybe that's the problem? The upgrade we did was simply a "git checkout master" and "git pull" on each module, and after that "php artisan cache:clear".

Any ideas? Thanks!

@drewpearce
Copy link

Off topic. If you have a specific bug you need addressed, you can open a new issue. However, this is not a bug.
Quick answers: upgrades need to be performed using composer. See the documentation linked above. It is essential! The many repos work together in tandem.
Second, filter conditions need to be enclosed in parentheses. See dox here: http://wiki.dreamfactory.com/DreamFactory/Tutorials/Querying_records_with_logical_filters (just updated)

@esval
Copy link

esval commented Jan 20, 2016

Thank you very much drewpearce, that was the problem . We had an old version both df-core and df- sqldb . After upgrading works correctly .

thanks for your time!

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

No branches or pull requests

4 participants