-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
V2 route handling #1149
V2 route handling #1149
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please switch to v2 temporarily, by changing quesma_v2 = true
in main.go
. It seems that unit tests require update.
go test
# quesma/quesma [quesma/quesma.test]
./search_common_table_test.go:332:25: queryRunner.handleSearch undefined (type *QueryRunner has no field or method handleSearch, but does have method HandleSearch)
./search_norace_test.go:56:16: queryRunner.handleSearch undefined (type *QueryRunner has no field or method handleSearch, but does have method HandleSearch)
./search_norace_test.go:128:22: queryRunner.handleSearch undefined (type *QueryRunner has no field or method handleSearch, but does have method HandleSearch)
./search_opensearch_test.go:64:27: queryRunner.handleSearch undefined (type *QueryRunner has no field or method handleSearch, but does have method HandleSearch)
./search_opensearch_test.go:200:31: queryRunner.handleSearch undefined (type *QueryRunner has no field or method handleSearch, but does have method HandleSearch)
./search_test.go:95:26: queryRunner.handleAsyncSearch undefined (type *QueryRunner has no field or method handleAsyncSearch, but does have method HandleAsyncSearch)
./search_test.go:146:26: queryRunner.handleAsyncSearch undefined (type *QueryRunner has no field or method handleAsyncSearch, but does have method HandleAsyncSearch)
./search_test.go:337:26: queryRunner.handleSearch undefined (type *QueryRunner has no field or method handleSearch, but does have method HandleSearch)
./search_test.go:397:26: queryRunner.handleSearch undefined (type *QueryRunner has no field or method handleSearch, but does have method HandleSearch)
./search_test.go:441:23: queryRunner.handleSearch undefined (type *QueryRunner has no field or method handleSearch, but does have method HandleSearch)
./search_test.go:441:23: too many errors
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM :)
IT seal of approval https://github.com/QuesmaOrg/quesma/actions/runs/12581972994 |
While working on #1119 I noticed that a lot of this code could already safely land in
main
branch and act as "general bridge" between the present andv2
api.Notable changes are switching to interfaces (
LogManagerIface
/QueryRunnerIFace
). Therefore we could introduce the intermediate layer in route handlers for queries which can use both old and new structures (new log manager using v2 api, etc.).Also, the
_field_caps
got more specific as it no longer accept full Quesma config to be more suited for being called within a processor (which just has index config).