gearbox-solutions / eloquent-filemaker

A Model extension and Eloquent driver for Laravel connecting to FileMaker through the Data API
https://gearboxgo.com
MIT License
54 stars 16 forks source link

Suggestion: use max limit by default #34

Closed lgebing closed 1 year ago

lgebing commented 1 year ago

Hi, this is less of an issue and more of a suggestion for a quality of life improvement.

After the removal of the all() method from the FMEloquentBuilder (which as I realized totally makes sense) there is no longer a convenient way off circumventing the 100 record limit of the FM Data API. This means you now have to write $query->limit(1000000000000000000)->get() (or similar) everywhere, or write your own helper method.

It would be nice if there was some helper provided by the package, or imo even better the get() method would automatically call ->limit(1000000000000000000) if no value was set prior to the get() call, as this better matches the behaviour of Laravel.

Of course you could also make this configurable to keep the default behaviour of the FM Data API as an option.

Smef commented 1 year ago

Yeah, I think we'll put this in as default behavior to set the limit to be very very high and bypass the regular 100. I was considering this after the last change.

Smef commented 1 year ago

This is now the default behavior in version 0.2.9.