Skip to content

[Bug]: GTE datetime #511

@putt-t

Description

@putt-t

What happened?

rust error

Steps to reproduce

queries

QUERY SearchRecentDocuments (vector: [F64], limit: I64, cutoff_date: Date) =>
    documents <- SearchV<Document>(vector, limit)::WHERE(_::{created_at}::GTE(cutoff_date))
    RETURN documents

QUERY InsertVector (vector: [F64], content: String, created_at: Date) =>
    document <- AddV<Document>(vector, { content: content, created_at: created_at })
    RETURN document

schema

V::Document {
    content: String,
    created_at: Date
}

Version

1.0.136

Environment

Development/Local

Relevant log output

error[E0277]: can't compare `helix_db::protocol::value::Value` with `DateTime<Utc>`
   --> helix-container/src/queries.rs:164:29
    |
164 | .map_value_or(false, |v| *v >= data.cutoff_date.clone())?)
    |                             ^^ no implementation for `helix_db::protocol::value::Value < DateTime<Utc>` and `helix_db::protocol::value::Value > DateTime<Utc>`
    |
    = help: the trait `PartialOrd<DateTime<Utc>>` is not implemented for `helix_db::protocol::value::Value`
    = help: the following other types implement trait `PartialOrd<Rhs>`:
              `helix_db::protocol::value::Value` implements `PartialOrd<f32>`
              `helix_db::protocol::value::Value` implements `PartialOrd<f64>`
              `helix_db::protocol::value::Value` implements `PartialOrd<helix_db::utils::id::ID>`
              `helix_db::protocol::value::Value` implements `PartialOrd<i16>`
              `helix_db::protocol::value::Value` implements `PartialOrd<i32>`
              `helix_db::protocol::value::Value` implements `PartialOrd<i64>`
              `helix_db::protocol::value::Value` implements `PartialOrd<i8>`
              `helix_db::protocol::value::Value` implements `PartialOrd<u128>`
            and 5 others

For more information about this error, try `rustc --explain E0277`.
error: could not compile `helix-container` (bin "helix-container") due to 1 previous error

Additional context

No response

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