themetalfleece / neogma

Object-Graph-Mapping neo4j framework, Fully-typed with TypeScript, for easy and flexible node and relationship operations
https://themetalfleece.github.io/neogma/
MIT License
122 stars 12 forks source link

Is it possible to use Where parameter operations in QueryBuilder? #92

Open Ansis100 opened 9 months ago

Ansis100 commented 9 months ago

When using any operators in QueryBuilder, Neogma outputs the following error:

NeogmaConstraintError: The only operator which is supported for object mode is "eq"

I noticed that QueryBuilder uses exclusively getStatement('object') to parse the where parameters, which causes the error. https://github.com/themetalfleece/neogma/blob/7bb78abd7c239f29317f4bfe00d0159c0690275d/src/Queries/QueryBuilder/QueryBuilder.ts#L611

Is this just a limitation of QueryBuilder or am I missing something?

P.S. Here's an example of my attempt at using operators:

.match({
  related: [
    // ...
    {
      // ...
      where: { value: { [Op.contains]: 'foo' } },
    }
  ],
})
// ...