Skip to content

Feature Request: Support in operator syntax #8

@amaster507

Description

@amaster507

Feature Request

What you wanted to do

Find multiple objects by matching a set of strings

collection|user|:q[
  find[
    in{
      value|username|: m[
        s|foo|,
        s|bar|
      ]
    }
  ]
];

What you did instead

Repeated the path multiple times inside of an or map

collection|user|:q[
  find[
    or[
      eq{
        value|username|:s|foo|
      },
      eq{
        value|username|:s|bar|
      }
    ]
  ]
]

Why that was not good

For the obvious reason, less code is always better when it can do the same thing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions