-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add query hook for any API method #53
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Leodau
reviewed
Jun 22, 2020
Leodau
approved these changes
Jun 23, 2020
Co-authored-by: Leonardo D'Aubeterre <bluedraggy@gmail.com>
alexandrebouthinon
approved these changes
Jun 24, 2020
...kuzzleFlags | ||
} | ||
|
||
static args = [ | ||
{ name: 'index', description: 'Index name', required: true }, | ||
{ name: 'collection', description: 'Collection name', required: true } | ||
{ name: 'collection', description: 'Collection name', required: true }, | ||
{ name: 'body', description: 'Collection mappings and settings in JS or JSON format. Will be read from STDIN if available' }, |
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.
Suggested change
{ name: 'body', description: 'Collection mappings and settings in JS or JSON format. Will be read from STDIN if available' }, | |
{ name: 'body', description: 'Collection mappings and settings in JS or JSON format. Will be read from STDIN if available' } |
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.
Actually this is intended, it's so much easier when you end with a trailing comma to add new element or copy paste any element
Merged
Aschen
added a commit
that referenced
this pull request
Jul 16, 2020
# [0.14.0](https://github.com/kuzzleio/kourou/releases/tag/0.14.0) (2020-07-16) #### New features - [ [#55](#55) ] User mapping import export ([berthieresteban](https://github.com/berthieresteban)) - [ [#54](#54) ] Instance:list and instance:kill commands ([berthieresteban](https://github.com/berthieresteban)) - [ [#53](#53) ] Add query hook for any API method ([Aschen](https://github.com/Aschen)) ---
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
When no command is found, Kourou will try to execute the given command with the
sdk:query
command.The first argument has to be the name of the controller and the action separated by a semicolon (eg
document:create
)Kourou will try to infer common arguments like
index
,collection
,_id
orbody
.It will automatically infer and accept the following lists of arguments:
<command> <index>
kourou collection:list iot
.
<command> <index> <collection>
kourou collection:truncate iot sensors
.
<command> <index> <collection> <body>
kourou bulk:import iot sensors '{bulkData: []}'
.
<command> <index> <collection> <id>
kourou document:delete iot sensors sigfox-123
.
<command> <index> <collection> <id> <body>
kourou document:create iot sensors sigfox-123 '{temperature: 42}'
Then any argument will be passed as-is to the
sdk:query
method.Other changes
--id
argument tosdk:query
document:get
document:create