FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Breaking changes to the Java driver by NotJustAnna · Pull Request #7 · rethinkdb/rethinkdb-java · GitHub

Breaking changes to the Java driver - #7

Merged
gabor-boros merged 40 commits into
masterfrom
develop/experimental
Mar 4, 2020
Merged

Breaking changes to the Java driver#7
gabor-boros merged 40 commits into
masterfrom
develop/experimental

Conversation

NotJustAnna commented Feb 10, 2020
edited
Loading

Copy link
Copy Markdown
Member

This PR tracks experimental changes for the official rethinkdb-java driver.

Implemented changes

  • Updated compile and test dependencies
  • Replaced json-simple with Jackson
    • JSON manipulation is done with plain Java collections
  • Replaced java.util.Optional usage with @Nullable annotations
  • Fixes Util.toReqlAst() wrongly resetting the remaining depth.
  • ReqlAst improvements
    • Support for Jackson's TypeReference<T> on ReqlAst.run()
    • ReqlAst.runAsync(): Asynchronous result
    • ReqlAst.toString() pretty-prints the AST
  • Added generics to MapObject
  • Connection rewrite
    • The connection and the response pump are now wrapped in an interface and custom factories can be set in the builder, with the default factories implemented at DefaultConnectionFactory
    • The handshake is entirely handled by the HandshakeProtocol class instead of the connection socket.
    • Connection.noreplyWaitAsync(): Asynchronous noreplyWait
    • Added Connection.server() and async variance (Implements Add server_info() command #14)
    • Added support for db-urls (Implements python drivers support db-url schemas rethinkdb#4101)
  • Cursor was deleted and replaced with Result
    • ReqlAsr.run() always returns Result<T>, which covers all result types and implements Iterator<T> and Iterable<T>
    • toList(), collect(), stream(), parallelStream() methods
    • Fetch modes for partial sequences
    • If enabled, unwraps atom responses which are lists (Result<List<T>> is unwrapped to Result<T>)
    • Exposed Response's Profile into the builder
    • Pending, leaking Results can be closed from the Connection
  • Added r.pathspec(...) (Implements Implement r.pathspec(...) #16)
  • Renamed methods with weird names and inlined factory methods and Response Builder
  • Util.toReqlAst() now properly serializes primitive arrays and other Collections as well.
  • Documentation for most public methods
  • A lot of small performance improvements.

Partially implemented

Notes

  1. Code which use Connection, Cursor and the old dynamic return type of .run breaks, but those classes got full documentation of the new usage.

  2. All tests doesn't compile. Root tests may need manual rewrite while Generated tests need Python scripts need rewrite to generate new valid tests. Tests now compile by patching TestingCommon to generate expected behaviour.

NotJustAnna commented Feb 12, 2020
edited
Loading

Copy link
Copy Markdown
Member Author

Enum deserialization should be implemented once #9 is merged. Merged and implemented.

Adrian Todt added 2 commits February 14, 2020 19:14
…com/rethinkdb/rethinkdb-java into develop/experimental

� Conflicts:
�	Makefile
�	build.gradle
�	src/main/java/com/rethinkdb/RethinkDB.java
�	src/main/java/com/rethinkdb/net/Util.java

NotJustAnna commented Feb 15, 2020
edited
Loading

Copy link
Copy Markdown
Member Author

If #12 gets merged, Cursors will be removed in favour of reactive flows.

UPDATE: Since 037429c, it now has a reactive Connection implementation, with detached Socket and Response Pump, if you want to write your custom implementation of the socket or integrate the response pump into your main service, say, Spring or Vert.x

Reactive streams was dropped due to their non-null behaviour.

NotJustAnna linked an issue Feb 15, 2020 that may be closed by this pull request
NotJustAnna linked an issue Feb 15, 2020 that may be closed by this pull request

Copy link
Copy Markdown
Member Author

rethinkdb/rethinkdb#4101 implemented on commits d214109 and e56f344.

NotJustAnna linked an issue Feb 17, 2020 that may be closed by this pull request
NotJustAnna marked this pull request as ready for review February 20, 2020 14:25
NotJustAnna changed the title Experimental changes to the driver Breaking changes to the Java driver Feb 20, 2020
NotJustAnna linked an issue Feb 20, 2020 that may be closed by this pull request
gabor-boros merged commit c312908 into master Mar 4, 2020
gabor-boros deleted the develop/experimental branch March 4, 2020 11:35
This file contains hidden or 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement r.pathspec(...) Implement pretty-printing ReQL AST Add server_info() command [Experimental] ReqlAst.run syntax

2 participants


Back | FazBrowse Home | New Git URL