Skip to content

[Bug]: CONTAINS operator causes build error #668

@ishaksebsib

Description

@ishaksebsib

What happened?

When using the CONTAINS in the query

The following error occurs:

error[E0599]: no method named `contains` found for reference `&helix_db::protocol::value::Value` in the current scope

The query works correctly when the CONTAINS condition is removed. This suggests that Value may not implement or expose a contains method compatible with the CONTAINS operator.

Steps to reproduce

query.hx

QUERY ExampleQuery(name: String) =>
    result <- N<Users>::WHERE(_::{fullname}::CONTAINS(name))
    RETURN result

schema.hx

N::Users {
    fullname: String,
    email: String,
    created_at: Date
}

Steps to Reproduce:

  1. Define the schema above.
  2. Create the query using the CONTAINS operator.
  3. Build the project.
  4. Observe the compiler error

Version

2.0.5

Environment

Development/Local

Relevant log output

Dockerfile:31

--------------------

  29 |     COPY helix-repo-copy/ ./

  30 |     COPY helix-container/ ./helix-container/

  31 | >>> RUN cargo build  --package helix-container

  32 |

  33 |     # Runtime image

--------------------

failed to solve: process "/bin/sh -c cargo build  --package helix-container" did not complete successfully: exit code: 101

Additional context

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions