Skip to content

Support for simple IN operator #5

Closed

Description

@javajack

Do you have any plan to support simple IN operator ?
I see that this library is still a work in progress.

Have you considered adding IN operator support ?
A simple IN operator dealing with string,long,double values would be a great addition.

example,

IN('US','UK','IN','NZ')

IN(1,2,3)

Activity

  1. eaxdev commented on Aug 23, 2020

    @eaxdev
    Owner

    Yes, this is a good idea. I'll do it soon

  2. self-assigned this
    on Aug 23, 2020
  3. added 2 commits that reference this issue on Aug 29, 2020
  4. eaxdev commented on Aug 29, 2020

    @eaxdev
    Owner

    Implemented in the version 0.0.3. You can use json like this:

    {
      "fields": [
        {
          "column": "field1"
        },
        {
          "column": "field2",
          "alias": "test"
        }
      ],
      "from": [
        {
          "table": "table1",
          "schema": "schema"
        }
      ],
      "where": {
        "or": [
          {
            "in": {
              "fieldName": "field3",
              "values": [
                "US",
                "UK",
                "IN",
                "NZ"
              ]
            }
          },
          {
            "eq": {
              "fieldName": "field4",
              "value": "3"
            }
          }
        ]
      }
    }
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions