-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
[db] Feature Request: Support for Parameters in QueryBuilder.search().elements().query() #1128
Comments
Hi, this feature is already included! The new
It is done this way because it is more flexible than having a parameter on the search queries directly. Select queries allow you to do much more like selecting only certain keys, selecting only keys without values etc. As a side not be cautious when using |
Let me know if this fulfils your use case. Thanks. |
Thank you for your answer, this meets my use case. |
If I want to clear the entire database, can there be a command similar to db_empty or db_clear? What is the difference between db_remove and db_delete? |
That might be a bit dangerous. If you don't care about history (audit) you
can simply delete the db and re-create it with the same name. Otherwise it
would require some consideration. Perhaps forcing a backup before clearing.
|
Yes, this operation is quite risky, so it is controlled through strict access permissions. |
This is now done in: #1132 The new api is: Resource options:
|
thks! |
I would like to request a new feature that allows for parameter support within the QueryBuilder.search().elements().query() method. Currently, I am looking for a way to specify whether the query should return values or not, similar to how SQL queries can be parameterized.
Feature Description:
It would be beneficial if we could pass a parameter to the QueryBuilder.search().elements() method to indicate whether the values should be included in the results. For example, the method signature could be modified to:
QueryBuilder.search().elements(boolean includedValues).query()
This would allow developers to control the output of the query more flexibly.
Use Case:
In some scenarios, we only need the structure of the query results without the actual values. By providing a parameter to control the inclusion of values, it would simplify the code and potentially improve performance by reducing the amount of data being processed and transferred.
Current Workaround:
Currently, I am using a workaround by manually filtering the results after the query execution, but this is not as efficient as having a built-in parameter.
Expected Behavior:
If the includedValues parameter is set to true, the query should return the values as part of the results. If set to false, the query should return only the structure without the values.
I believe this feature would greatly enhance the flexibility and usability of our QueryBuilder.
Thank you for considering this feature request.
Best regards,
pinghe
The text was updated successfully, but these errors were encountered: