Skip to content

Conversation

@bevzzz
Copy link
Collaborator

@bevzzz bevzzz commented Jun 11, 2025

⏳ Waiting for #387.

This PR introduces fetchObjects query to search the database using "conventional" filters. It also adds filters to every query in the collection.query namespace.

var got = hats.query.fetchObjects(
  query -> query.where(
    Where.or(
      Where.property("colour").eq("orange"),
      Where.and(
        Where.property("size").gte(1),
        Where.property("size").lt(6)))));

Add client.collections.fetchObjects to run queries without a dedicated search operator.
Update PropertyBuilder interface to handle null values.
@bevzzz bevzzz self-assigned this Jun 11, 2025
Copy link

@orca-security-eu orca-security-eu bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca

@bevzzz bevzzz changed the base branch from v6 to v6-async-rest June 11, 2025 13:35
@bevzzz bevzzz linked an issue Jun 11, 2025 that may be closed by this pull request
2 tasks
@bevzzz
Copy link
Collaborator Author

bevzzz commented Jun 11, 2025

❓ Does it make that "fetch by id" query has any query options other than returnProperties and returnMetadata?

While this doesn't make sense to me (even if it's a valid query):

things.query.byId("id-1", opt -> opt.limit(2).where(Where.property("x").eq("y")));

I'm wondering if we should still let the user do it?

@bevzzz
Copy link
Collaborator Author

bevzzz commented Jun 11, 2025

Does it make that "fetch by id" query has any query options other than returnProperties and returnMetadata?

We agreed to remove it for byId query and for byIdMany in the future too.

Base automatically changed from v6-async-rest to v6 June 12, 2025 11:07
@bevzzz bevzzz marked this pull request as ready for review June 12, 2025 11:07
@bevzzz bevzzz merged commit 8121c4d into v6 Jun 12, 2025
2 checks passed
@bevzzz bevzzz deleted the feat/v6-filters branch June 12, 2025 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Filtering in nearVector query

2 participants