Skip to content

add QUERY method support#6051

Draft
rnewson wants to merge 1 commit into
mainfrom
query-method
Draft

add QUERY method support#6051
rnewson wants to merge 1 commit into
mainfrom
query-method

Conversation

@rnewson

@rnewson rnewson commented Jun 25, 2026

Copy link
Copy Markdown
Member

Overview

Accept QUERY method wherever POST is allowed when querying the database. Only endpoints that make no state changes are eligible. Send Accept-Query: "application/json" for all requests to such endpoints to aid discovery.

Testing recommendations

TBD

Related Issues or Pull Requests

N/A

Checklist

  • This is my own work, I did not use AI, LLM's or similar technology
  • Code is written and works correctly
  • Changes are covered by tests
  • Any new configurable parameters are documented in rel/overlay/etc/default.ini
  • Documentation changes were made in the src/docs folder
  • Documentation changes were backported (separated PR) to affected branches

@rnewson

rnewson commented Jun 25, 2026

Copy link
Copy Markdown
Member Author

@vanshhhhh

vanshhhhh commented Jul 9, 2026

Copy link
Copy Markdown

Hey @rnewson, I compiled and tested the draft PR #6051 branch locally on Windows (Python 3.13.7, Erlang OTP 29) at head commit 34c2e9a.

I noticed that:

  • Requests to QUERY /db/_find and QUERY /db/_partition/{partition}/_find returned 405 Method Not Allowed with the header Allow: POST.
  • Requests to QUERY /db/_explain returned 405 Method Not Allowed with the header Allow: POST.
  • Requests to QUERY /db/_index returned 405 Method Not Allowed with the header Allow: GET,POST.

I wanted to coordinate on the planned scope:

  1. Is extending QUERY method support to standard and partitioned Mango _find routes intended to be within the scope of this PR effort?
  2. Are _explain and _index routes intentionally excluded from QUERY support?
  3. If help with adding the Mango subsystem integration is welcome, I would be happy to assist.

@rnewson

rnewson commented Jul 9, 2026

Copy link
Copy Markdown
Member Author

hm, I guess i missed a few spots, but certainly _index is not a query, it creates an index.

@rnewson

rnewson commented Jul 9, 2026

Copy link
Copy Markdown
Member Author

added query method for _find and _explain.

@rnewson

rnewson commented Jul 9, 2026

Copy link
Copy Markdown
Member Author

(noting this is still draft. I haven't written docs or tests, or ensured all QUERY-able endpoints can take all their arguments exclusively from the request body and not the query string).

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.

2 participants