zauberfisch

is there still no :SomeFilter for ArrayList?

jkersu

Not sure 100% but I understood that it was only for DataLists because SearchFilters need to be query-related. Theres an old issue from a while ago: https://github.com/silverstripe/silverstripe-framework/issues/5911

Show 7 attachment(s)
patricknelson

Request for enhancement to ArrayList originally discussed in (and subsequently taken from) <https://groups.google.com/forum/#!topic/silverstripe-dev/uOvaY6vN664|core dev DL> and setup as an issue here for tracking.

It appears that array lists do not actually utilize filters. I was racking my brain trying to figure out why the heck this filter wouldn't work at all:

return $list-&gt;filter([
    "IntegerField:GreaterThan" =&gt; 123,
])-&gt;first();

After inspecting the -&gt;filter() method, I noticed this core class didn't seem to handle this in the same way as DataList. It seemed to just do a straight direct comparison... is this an oversight and, if so, should this be added into core? The consensus thus far seems to be that this enhancement would, in fact, be desirable :smile:

Third party library for consideration to help handle this for us (per https://github.com/kinglozzer|@kinglozzer's recommendation): http://elliotswebsite.com/Pinq/|http://elliotswebsite.com/Pinq/ and https://github.com/TimeToogo/Pinq|https://github.com/TimeToogo/Pinq

patricknelson

Request for enhancement to ArrayList originally discussed in (and subsequently taken from) <https://groups.google.com/forum/#!topic/silverstripe-dev/uOvaY6vN664|core dev DL> and setup as an issue here for tracking.

It appears that array lists do not actually utilize filters. I was racking my brain trying to figure out why the heck this filter wouldn't work at all:

return $list-&gt;filter([
    "IntegerField:GreaterThan" =&gt; 123,
])-&gt;first();

After inspecting the -&gt;filter() method, I noticed this core class didn't seem to handle this in the same way as DataList. It seemed to just do a straight direct comparison... is this an oversight and, if so, should this be added into core? The consensus thus far seems to be that this enhancement would, in fact, be desirable :smile:

Third party library for consideration to help handle this for us (per https://github.com/kinglozzer|@kinglozzer's recommendation): http://elliotswebsite.com/Pinq/|http://elliotswebsite.com/Pinq/ and https://github.com/TimeToogo/Pinq|https://github.com/TimeToogo/Pinq

patricknelson

Request for enhancement to ArrayList originally discussed in (and subsequently taken from) <https://groups.google.com/forum/#!topic/silverstripe-dev/uOvaY6vN664|core dev DL> and setup as an issue here for tracking.

It appears that array lists do not actually utilize filters. I was racking my brain trying to figure out why the heck this filter wouldn't work at all:

return $list-&gt;filter([
    "IntegerField:GreaterThan" =&gt; 123,
])-&gt;first();

After inspecting the -&gt;filter() method, I noticed this core class didn't seem to handle this in the same way as DataList. It seemed to just do a straight direct comparison... is this an oversight and, if so, should this be added into core? The consensus thus far seems to be that this enhancement would, in fact, be desirable :smile:

Third party library for consideration to help handle this for us (per https://github.com/kinglozzer|@kinglozzer's recommendation): http://elliotswebsite.com/Pinq/|http://elliotswebsite.com/Pinq/ and https://github.com/TimeToogo/Pinq|https://github.com/TimeToogo/Pinq

patricknelson

Request for enhancement to ArrayList originally discussed in (and subsequently taken from) <https://groups.google.com/forum/#!topic/silverstripe-dev/uOvaY6vN664|core dev DL> and setup as an issue here for tracking.

It appears that array lists do not actually utilize filters. I was racking my brain trying to figure out why the heck this filter wouldn't work at all:

return $list-&gt;filter([
    "IntegerField:GreaterThan" =&gt; 123,
])-&gt;first();

After inspecting the -&gt;filter() method, I noticed this core class didn't seem to handle this in the same way as DataList. It seemed to just do a straight direct comparison... is this an oversight and, if so, should this be added into core? The consensus thus far seems to be that this enhancement would, in fact, be desirable :smile:

Third party library for consideration to help handle this for us (per https://github.com/kinglozzer|@kinglozzer's recommendation): http://elliotswebsite.com/Pinq/|http://elliotswebsite.com/Pinq/ and https://github.com/TimeToogo/Pinq|https://github.com/TimeToogo/Pinq

patricknelson

Request for enhancement to ArrayList originally discussed in (and subsequently taken from) <https://groups.google.com/forum/#!topic/silverstripe-dev/uOvaY6vN664|core dev DL> and setup as an issue here for tracking.

It appears that array lists do not actually utilize filters. I was racking my brain trying to figure out why the heck this filter wouldn't work at all:

return $list-&gt;filter([
    "IntegerField:GreaterThan" =&gt; 123,
])-&gt;first();

After inspecting the -&gt;filter() method, I noticed this core class didn't seem to handle this in the same way as DataList. It seemed to just do a straight direct comparison... is this an oversight and, if so, should this be added into core? The consensus thus far seems to be that this enhancement would, in fact, be desirable :smile:

Third party library for consideration to help handle this for us (per https://github.com/kinglozzer|@kinglozzer's recommendation): http://elliotswebsite.com/Pinq/|http://elliotswebsite.com/Pinq/ and https://github.com/TimeToogo/Pinq|https://github.com/TimeToogo/Pinq

patricknelson

Request for enhancement to ArrayList originally discussed in (and subsequently taken from) <https://groups.google.com/forum/#!topic/silverstripe-dev/uOvaY6vN664|core dev DL> and setup as an issue here for tracking.

It appears that array lists do not actually utilize filters. I was racking my brain trying to figure out why the heck this filter wouldn't work at all:

return $list-&gt;filter([
    "IntegerField:GreaterThan" =&gt; 123,
])-&gt;first();

After inspecting the -&gt;filter() method, I noticed this core class didn't seem to handle this in the same way as DataList. It seemed to just do a straight direct comparison... is this an oversight and, if so, should this be added into core? The consensus thus far seems to be that this enhancement would, in fact, be desirable :smile:

Third party library for consideration to help handle this for us (per https://github.com/kinglozzer|@kinglozzer's recommendation): http://elliotswebsite.com/Pinq/|http://elliotswebsite.com/Pinq/ and https://github.com/TimeToogo/Pinq|https://github.com/TimeToogo/Pinq

patricknelson

Request for enhancement to ArrayList originally discussed in (and subsequently taken from) <https://groups.google.com/forum/#!topic/silverstripe-dev/uOvaY6vN664|core dev DL> and setup as an issue here for tracking.

It appears that array lists do not actually utilize filters. I was racking my brain trying to figure out why the heck this filter wouldn't work at all:

return $list-&gt;filter([
    "IntegerField:GreaterThan" =&gt; 123,
])-&gt;first();

After inspecting the -&gt;filter() method, I noticed this core class didn't seem to handle this in the same way as DataList. It seemed to just do a straight direct comparison... is this an oversight and, if so, should this be added into core? The consensus thus far seems to be that this enhancement would, in fact, be desirable :smile:

Third party library for consideration to help handle this for us (per https://github.com/kinglozzer|@kinglozzer's recommendation): http://elliotswebsite.com/Pinq/|http://elliotswebsite.com/Pinq/ and https://github.com/TimeToogo/Pinq|https://github.com/TimeToogo/Pinq

Hide attachment content
wmk

Fun fact: Today (May 14th) it's the saints day of St. Corona.

😷 (1)
wmk

also google has a (paid) api, so an adaptor for google geo lookup could be useful

wmk

@null for EU or at least central EU there is opengeodb, so that could be a useful module for other countries, too.

null

I wonder if there's any interest in maintaining an open-source list of postcodes up on Github or something

👍 (1)
null

That's a good idea! But then I have to rename the module

null

I see what you mean about interfaces now