Skip to content

Releases: ricktap/Qriteria

Let's get rid of Input!

13 Aug 10:26
Compare
Choose a tag to compare

This is just a minor release, that replaces the Input facade for the response() method, that comes with laravel, to support a wider installation base (the automatic inclusion of Input got removed in 5.1 or 5.2 I believe).

Let's add choices!

12 Aug 10:49
Compare
Choose a tag to compare

Added a second Filter Implementation to point out how easy it is to create your own filters. Unfortunately this needs to be a mandatory option for me to support, as the json api specification is not clear about how the filter request parameter should look like. As of right now, the Qriteria Package supports a nested string filter and an array field filter or anything you can think of yourself:

NestedString:

?filter=name:=:Bob,(age:<:25|age:>:50)

This is the filter to go with, if you need a lot of control over your queries. The above would translate to:

WHERE name = 'Bob' AND (age < 25 OR age > 50)

In the example the , means AND, the | means or. Everything between parentheses will be grouped. The operations = and < will be expanded by keywords like eq and lt in a future version. The new syntax would then look like:

?filter=name:eq:Bob,(age:lt:25|age:gt:50)

ArrayField

?filter[name]=Bob&filter[age]=25

This Version does not support operations like less than or like, but only does plain old equals. There is also no support for grouping and telling the filters to perform an or. Since there is no or, there was no reason for me to include an option to have the same field twice. On multiple definition of filter[field], the last occurrence would take precedence over the others. The example would perform the following query:

WHERE name = 'Bob' and age = 25

Let's filter!

12 Aug 09:42
Compare
Choose a tag to compare

The advanced filtering has been implemented. Please be aware, that no extensive testing is in place as of right now, but it's in the pipeline. Also the implementation does not check on user errors right now, it depends on you knowing what you are doing when using the code. The implementation checks will be my highest priority for next release. Stay tuned...

Let's begin!

11 Aug 08:35
Compare
Choose a tag to compare
0.3.0

fix links