studiomado / query-bundle

Query doctrine database from query string and provide HATEOAS responses.
MIT License
13 stars 5 forks source link

feature/2.2/provide field usable operators #156

Closed sensorario closed 6 years ago

sensorario commented 6 years ago
Q A
Branch? 2.2
Minor version? 2.2
Hotfix? no
Refactoring? yes
New feature? yes
BC breaks? yes/no
Deprecations? no
Tests pass? yes

This PR contains a little Dictionary refactoring. Dictionary's operators are now splitted in three families:

The component provide database map to the client with operator that can be used, for each field, to apply a filter. It is called Sherlock just because will helps in searches. It does not commit any search.

For each entity it provide a map with filters and relations

{
    "fields": [],
    "relations": [],
}

Each node will be like this:

"appbundle.entity.entityname": {
    "fields": [
        "id": [">", "<", "=", ...],
        "username": ["contains", "endswith", ...],
    ],
    "relations": [
        "relName": "thebundle.entity.entityName"
    ],
}
AlessandroMinoccheri commented 6 years ago

squash and merge