Skip to content

fix(cli): offer --select on create-query - #2076

Merged
ChiragAgg5k merged 2 commits into
mainfrom
fix/cli-create-query-select
Oct 16, 2026
Merged

ChiragAgg5k merged 2 commits into
mainfrom
fix/cli-create-query-select

Conversation

@ChiragAgg5k

@ChiragAgg5k ChiragAgg5k commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

databases, tablesdb and documentsdb create-query are the list endpoints with the queries sent in the body, but the generated commands lacked the --select flag that list-documents and list-rows have, because --select is only enabled for a fixed list of method names. Hansi flagged this on the CLI 28.7.0 release PR (appwrite/sdk-for-cli#373).

This adds createQuery to that list, so the three commands register --select, add it to the built queries, and describe it in --queries.

Verification

  • php example.php cli, gofmt -l, go build/vet/test ./... in examples/cli
  • vendor/bin/phpunit --testsuite Generation, composer lint, composer refactor:check

Related: appwrite-labs/cloud#6622

@hansi-codes

hansi-codes Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

🟢 Tier S · Ready to merge

The CLI query configuration now enables --select for createQuery, allowing generated commands to expose selection with their query flags. A generation test compares the emitted selection flag for listRows and createQuery operations.

Verdict New comments Fixed Still open
✅ Approved 0 0 0
📂 Walkthrough · 2
File Change
src/SDK/Language/Concern/CliCommandSurface.php Enables selection queries for methods named createQuery.
tests/generation/GenerationTest.php Adds generated CLI coverage for --select on GET and POST query operations.

Reviewed 7880547 · Details · Comment @hansi-codes review to re-run, or mention @hansi-codes with a question.

@ChiragAgg5k ChiragAgg5k self-assigned this Oct 16, 2026

@hansi-codes hansi-codes Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Tier S · Looks good to merge. Summary

@ChiragAgg5k
ChiragAgg5k merged commit 9c9c339 into main Oct 16, 2026
61 checks passed
@ChiragAgg5k
ChiragAgg5k deleted the fix/cli-create-query-select branch October 16, 2026 19:58
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.

1 participant