Skip to content
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

feat: Add stdin support in CLI #608

Merged
merged 4 commits into from
Jul 8, 2022
Merged

Conversation

orpheuslummis
Copy link
Contributor

@orpheuslummis orpheuslummis commented Jul 8, 2022

Relevant issue(s)

Resolves #350

Description

Adds stdin support to commands client query and client schema add.

Additionally,

  • uses the RunE error handling pattern / bubbling up to caller.
  • improves CLI text
  • indented JSON results
  • schema add also accepting argument string

Tasks

  • I made sure the code is well commented, particularly hard-to-understand areas.
  • I made sure the repository-held documentation is changed accordingly.
  • I made sure the pull request title adheres to the conventional commit style (the subset used in the project can be found in tools/configs/chglog/config.yml).
  • I made sure to discuss its limitations such as threats to validity, vulnerability to mistake and misuse, robustness to invalidation of assumptions, resource requirements, ...

How has this been tested?

Specify the platform(s) on which this was tested:

  • Debian Linux
  • MacOS

@orpheuslummis orpheuslummis added feature New feature or request area/cli Related to the CLI binary labels Jul 8, 2022
@orpheuslummis orpheuslummis added this to the DefraDB v0.3 milestone Jul 8, 2022
@orpheuslummis orpheuslummis self-assigned this Jul 8, 2022
@orpheuslummis orpheuslummis added the action/no-benchmark Skips the action that runs the benchmark. label Jul 8, 2022
@sourcenetwork sourcenetwork deleted a comment from source-devs Jul 8, 2022
@sourcenetwork sourcenetwork deleted a comment from source-devs Jul 8, 2022
@orpheuslummis orpheuslummis marked this pull request as ready for review July 8, 2022 13:47
@orpheuslummis orpheuslummis requested a review from a team July 8, 2022 13:47
@orpheuslummis
Copy link
Contributor Author

Screen.Recording.2022-07-08.at.08.56.09.mov

cli/cli.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@fredcarle fredcarle left a comment

Choose a reason for hiding this comment

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

LGTM :)

@orpheuslummis orpheuslummis merged commit e6b41d7 into develop Jul 8, 2022
@orpheuslummis orpheuslummis deleted the orpheus/feat/cli-stdin branch July 8, 2022 21:32
shahzadlone pushed a commit to shahzadlone/defradb that referenced this pull request Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action/no-benchmark Skips the action that runs the benchmark. area/cli Related to the CLI binary feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CLI: input queries via stdin
3 participants