-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce 3.0 Python driver docs and tests. Implement new fetch BDD s…
…teps in 3.0 drivers (#700) ## Usage and product changes We introduce updated documentation, usage examples, and automated tests for the Java driver, to cover all the existing driver's APIs by sustainable validations. Additionally, we implement additional BDD steps to check concept documents in BDDs for other 3.0 drivers: Rust and Python. As a small bonus, the protocol has been updated, and `Ok` `QueryAnswer`s receive correct `QueryType`s from the server instead of the client-side hardcode usage. ## Implementation For behaviour tests, the already existing architecture is preserved, and only the steps are rewritten to match the new definitions. For integration tests, the new approach of the Python driver is chosen, and all the excessive tests are removed. Now, we only write `example` tests and tests to cover language-specific values (especially our implementations and their interfaces). For docs, the old instruments are used without changes. For `README`, the `example` integration test parsing instrument is used as in Rust and Python.
- Loading branch information
Showing
76 changed files
with
4,056 additions
and
2,444 deletions.
There are no files selected for viewing
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
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
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
75 changes: 75 additions & 0 deletions
75
docs/modules/ROOT/partials/java/answer/ConceptDocumentIterator.adoc
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
[#_ConceptDocumentIterator] | ||
=== ConceptDocumentIterator | ||
*Package*: `com.typedb.driver.api.answer` | ||
*Superinterfaces:* | ||
* `java.util.Iterator<JSON>` | ||
* `QueryAnswer` | ||
Represents an iterator over concept documents (represented as ``JSON``s) returned as a server answer. | ||
// tag::methods[] | ||
[#_ConceptDocumentIterator_asConceptDocuments_] | ||
==== asConceptDocuments | ||
|
||
[source,java] | ||
---- | ||
@CheckReturnValue | ||
default ConceptDocumentIterator asConceptDocuments() | ||
---- | ||
|
||
Casts the query answer to ``ConceptDocumentIterator``. | ||
|
||
|
||
[caption=""] | ||
.Returns | ||
`ConceptDocumentIterator` | ||
|
||
[caption=""] | ||
.Code examples | ||
[source,java] | ||
---- | ||
concept.asConceptDocuments(); | ||
---- | ||
|
||
[#_ConceptDocumentIterator_isConceptDocuments_] | ||
==== isConceptDocuments | ||
|
||
[source,java] | ||
---- | ||
default boolean isConceptDocuments() | ||
---- | ||
|
||
Checks if the query answer is a ``ConceptDocumentIterator``. | ||
|
||
|
||
[caption=""] | ||
.Returns | ||
`boolean` | ||
|
||
[caption=""] | ||
.Code examples | ||
[source,java] | ||
---- | ||
concept.isConceptDocuments(); | ||
---- | ||
|
||
[#_ConceptDocumentIterator_stream_] | ||
==== stream | ||
|
||
[source,java] | ||
---- | ||
@CheckReturnValue | ||
java.util.stream.Stream<JSON> stream() | ||
---- | ||
|
||
|
||
|
||
[caption=""] | ||
.Returns | ||
`java.util.stream.Stream<JSON>` | ||
|
||
// end::methods[] | ||
|
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
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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.