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

Custom bindings for fields #32

Open
curunoir opened this issue Jul 26, 2018 · 1 comment
Open

Custom bindings for fields #32

curunoir opened this issue Jul 26, 2018 · 1 comment

Comments

@curunoir
Copy link

Hello,
it would be helpful to be able to create bindings for fields similarly at what is done for JoinSupportingQueryBuilderParser. If I store some values within json columns I can't use the parser to filter on these fields easily. Something like that could be usefull :

$bindingsFields = array(
        'myjsonfield1' => array(
            'from_table'      => 'table1',
            'from_col'        => 'json_col',
            'json_path'        => 'json_fields->myjsonfield1->myjsonfield1->value' // should be optional if field is not within a json column
        ),

@geo903
Copy link

geo903 commented Oct 21, 2023

you can access json fields like this

{
  "condition": "OR",
  "rules": [
    {
      "id": "firstname",
      "field": "fields->first_name",
      "type": "string",
      "input": "text",
      "operator": "equal",
      "value": "hhh"
    },
    {
      "id": "tel",
      "field": "fields->tel",
      "type": "string",
      "input": "text",
      "operator": "equal",
      "value": "77"
    }
  ],
  "valid": true
}

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

2 participants