This repository was archived by the owner on Oct 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
Overhaul query options #98
Merged
flyingsilverfin
merged 12 commits into
typedb:master
from
adammitchelldev:overhaul-options
Jun 17, 2020
Merged
Overhaul query options #98
flyingsilverfin
merged 12 commits into
typedb:master
from
adammitchelldev:overhaul-options
Jun 17, 2020
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
queryMessage.setQuery(query); | ||
if (options) { | ||
if ('infer' in options) { | ||
queryMessage.setInfer(options.infer ? INFER_TRUE_MESSAGE : INFER_FALSE_MESSAGE); | ||
optionsMessage.setInferFlag(options.infer); |
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.
should probably check that these are boolean flags and throw error otherwise?
@@ -73,4 +73,8 @@ describe("Query methods", () => { | |||
const results = await iterator.collect(); | |||
expect(results.length).toEqual(128); | |||
}) | |||
|
|||
it("accepts valid options", async () => { |
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.
other tests required on explain
, batch
and infer
flags
flyingsilverfin
approved these changes
Jun 17, 2020
dmitrii-ubskii
pushed a commit
to dmitrii-ubskii/typedb-client-nodejs
that referenced
this pull request
Sep 1, 2023
## What is the goal of this PR? fix typedb#98 To fix an issue where getting meta types via concept API causes a cast error. The `MetaType` class should be treated as a `Type` so that it is compatible with regular type instances. This should prevents calls like `subs` on the meta type from incorrectly casting their subs to a `MetaType`. ## What are the changes implemented in this PR? * `MetaType`s are treated like `Type` for the purposes of casting.
dmitrii-ubskii
pushed a commit
to dmitrii-ubskii/typedb-client-nodejs
that referenced
this pull request
Sep 1, 2023
## What is the goal of this PR? As it turns out, we still need to use Python 2 in `deploy-github`, just at a very specific stage of it. ## What are the changes implemented in this PR? Before executing the actual deployment to GitHub, we switch back to Python 2 and clean the Bazel sandbox such that PyPI dependencies are refetched
# for free
to subscribe to this conversation on GitHub.
Already have an account?
#.
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 is the goal of this PR?
We introduce modified
infer
, and newbatch_size
, andexplain
options for queries:The default (undefined setting of the above options) value means that the server will automatically choose the default value for
infer
,explain
, andbatch_size
. For reference, the server will default toinfer = true
,explain = true
, andbatch_size = 50
.** use
explain:true
if you want to retrieve explanations from your query ** This was introduced to ensure correct Explanations, without consuming too much Transaction memory when not required.What are the changes implemented in this PR?
explain
query optionbatchSize
query option into the query options, instead of iteration optionsexplain
andinfer
flag