Skip to content

Filter bool number#2881

Open
stevelr wants to merge 6 commits intoanyproto:developfrom
stevelr:filter-bool-number
Open

Filter bool number#2881
stevelr wants to merge 6 commits intoanyproto:developfrom
stevelr:filter-bool-number

Conversation

@stevelr
Copy link
Copy Markdown
Contributor

@stevelr stevelr commented Jan 6, 2026

  • I understand that contributing to this repository will require me to agree with the CLA

Description

filters of the form "property_type=value" do not work for

  • boolean properties, where value is 'true' or 'false'
  • numeric properties, where value is a number (int or floating point)

Also, [in] and [not-in] conditions don't work for numbers.
The error returned in "property type is not a boolean/number"

I didn't add support for bool property [in] and [not-in] since I didn't think it made sense.

What type of PR is this? (check all applicable)

  • 🍕 Feature
  • 🐛 Bug Fix
  • 📝 Documentation Update
  • 🎨 Style
  • 🧑‍💻 Code Refactor
  • 🔥 Performance Improvements
  • ✅ Test
  • 🤖 Build
  • 🔁 CI

Related Tickets & Documents

Fixes #2879

This is one of three bug fix PRs that arose out of testing object queries and filters in a rust SDK for Anytype (the problems can be reproduced with curl so they are not rust-related).

2881 Filter bool numbers
2880 core/api: allow type object ids in type filters
2882 core/api/filter: allow select tag ids

To keep the changes simpler and easier to review, they are separate PRs. I have another branch that combines them for testing - let me know if you'd rather I submit that as a PR instead.

Mobile & Desktop Screenshots/Recordings

N/A

Added tests?

  • 👍 yes
  • 🙅 no, because they aren't needed
  • 🙋 no, because I need help

Added to documentation?

  • 📜 README.md
  • 📓 tech-docs
  • 🙅 no documentation needed

[optional] Are there any post-deployment tasks we need to perform?

N/A

Comment thread core/api/filter/validator.go
Comment thread pkg/lib/database/filter.go
@stevelr stevelr force-pushed the filter-bool-number branch 2 times, most recently from a51a434 to 3cfb879 Compare February 12, 2026 01:36
@stevelr stevelr requested a review from deff7 February 12, 2026 02:57
Comment thread pkg/lib/database/filter.go
Comment thread pkg/lib/database/filter.go
Comment thread pkg/lib/database/filter_test.go Outdated
  Resolve merge conflicts in core/api/filter/validator.go and
  validator_test.go by combining checkbox/number parsing with
  upstream's select tag validation. Take upstream go.mod/go.sum.
@stevelr
Copy link
Copy Markdown
Contributor Author

stevelr commented Feb 17, 2026

@deff7
thanks for taking a look at this.
sorry about my earlier misunderstanding about missing vs false. I think I fixed it, and fixed the test. I asked claude to review this using your go-reviewer skill and it found no critical/high/medium issues. I didn't address the low priority issues to keep this pr more targeted.

@stevelr stevelr requested a review from deff7 February 17, 2026 17:59
@deff7
Copy link
Copy Markdown
Member

deff7 commented Mar 3, 2026

@stevelr Hi, looks like you've merged two separate PRs into this one. Could you please remove changes not related to the original PR?

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.

property_key=value filters in get_objects rest queries do not support boolean or number values

2 participants