Skip to content
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

Release version v2.4.3 #49

Merged
merged 30 commits into from
May 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
b969346
db-url generation, db-url support for unwrapLists and defaultFetchMode
Mar 24, 2020
22cfa54
Unit test for Types
Mar 24, 2020
0bd8dcb
New runAtom helper
Mar 24, 2020
830ade7
New runGrouping helper
Mar 24, 2020
4382cd5
New runUnwrapping helper
Mar 24, 2020
b23e0ab
Removed dangling semicolon
Mar 24, 2020
5368e15
unwrapLists now can be configured at runtime
Mar 24, 2020
bb142db
Merge pull request #42 from rethinkdb/feature/enhance-db-urls
Mar 29, 2020
cf5272b
Merge pull request #43 from rethinkdb/tests/types
Mar 29, 2020
863e930
Merge pull request #44 from rethinkdb/feature/run-helpers
Mar 29, 2020
e549c31
Asynchronous variances for connect, reconnect and close methods.
Apr 19, 2020
74be98a
Optimized queries.
Apr 19, 2020
ef91abb
Response pump is now faster due to Response parsing being done in ano…
Apr 20, 2020
3f9184c
Due to the previous commit, this doesn't need to be in a different th…
Apr 20, 2020
3181f5a
Revert "unwrapLists now can be configured at runtime"
Apr 20, 2020
456f186
Merge branch 'master' into develop
Apr 20, 2020
2cfa153
Asynchronous variances for connect, reconnect and close methods.
Apr 19, 2020
19b4afd
Optimized queries.
Apr 19, 2020
5df36c7
Response pump is now faster due to Response parsing being done in ano…
Apr 20, 2020
b0474b1
Due to the previous commit, this doesn't need to be in a different th…
Apr 20, 2020
0379682
Revert "unwrapLists now can be configured at runtime"
Apr 20, 2020
0e8b499
Merge remote-tracking branch 'origin/feature/async-connection' into f…
Apr 20, 2020
3f50bdf
Deprecated support for auth-key, documented all methods.
Apr 20, 2020
6fc82f5
Fixed tests, non-breaking support for async connection factories.
Apr 20, 2020
8fc00d5
Merge pull request #46 from rethinkdb/feature/async-connection
Apr 21, 2020
16c0a8d
Added run helpers unit testing. Fixed bug with grouped result pseudot…
Apr 21, 2020
501ad5e
Merge pull request #48 from rethinkdb/tests/run-helpers
Apr 22, 2020
07e5980
Merge branch 'master' into develop
Apr 28, 2020
d9f741b
Update .gitignore to match file of feature/kotlin-scripts branch
Apr 28, 2020
7166075
Version bump, fix documentation, add extra deployment steps.
Apr 28, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 18 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
build/
out/
.gradle/
# ## RethinkDB .gitignore

# General
.#*

# IDE-related
*.iml
.idea/
.vscode/
out/

# Java-related
*.class

# Gradle-related
build/
.gradle/
confidential.properties

# Kotlin scripts
scripts/kotlinc/

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand All @@ -27,7 +41,4 @@ virtualenv/

# RethinkDB
scripts/*.proto

# Editors
.vscode/
.idea/
test-dburl-override.txt
4 changes: 4 additions & 0 deletions DEPLOYING.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,7 @@ To upload a new release directly to Sonatype, run the Gradle task `uploadArchive
After release, you may need to go to https://oss.sonatype.org/#stagingRepositories and search for "rethinkdb" in the search box, find the release that is in status `open`. Select it and then click the `Close` button. This will check it and make it ready for release. If that stage passes you can click the `Release` button.

For full instructions see: http://central.sonatype.org/pages/releasing-the-deployment.html

## After deploying: Documentations

After deploying, the following file must be updated to reflect the new version: https://github.com/rethinkdb/docs/blob/master/0-getting-started/drivers/java.md
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ plugins {
id("com.jfrog.bintray") version "1.8.4"
}

version = "2.4.2"
version = "2.4.3"
group = "com.rethinkdb"

java.sourceCompatibility = JavaVersion.VERSION_1_8
Expand Down
23 changes: 17 additions & 6 deletions src/main/java/com/rethinkdb/RethinkDB.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/
public class RethinkDB extends TopLevel {
/**
* The Singleton to use to begin interacting with RethinkDB Driver
* The Singleton to use to begin interacting with RethinkDB Driver.
*/
public static final RethinkDB r = new RethinkDB();
/**
Expand All @@ -25,7 +25,7 @@ public class RethinkDB extends TopLevel {
/**
* Gets (or creates, if null) the {@link ObjectMapper} for handling {@link com.rethinkdb.net.Result}'s values.
*
* @return the {@link com.rethinkdb.net.Result}'s {@link ObjectMapper}
* @return the {@link com.rethinkdb.net.Result}'s {@link ObjectMapper}.
*/
public synchronized static @NotNull ObjectMapper getResultMapper() {
ObjectMapper mapper = resultMapper;
Expand All @@ -40,7 +40,7 @@ public class RethinkDB extends TopLevel {
/**
* Sets the {@link ObjectMapper} for handling {@link com.rethinkdb.net.Result}'s values.
*
* @param mapper an {@link ObjectMapper}, or null
* @param mapper an {@link ObjectMapper}, or null.
*/
public synchronized static void setResultMapper(@Nullable ObjectMapper mapper) {
resultMapper = mapper;
Expand All @@ -49,7 +49,7 @@ public synchronized static void setResultMapper(@Nullable ObjectMapper mapper) {
/**
* Creates a new connection builder.
*
* @return a newly created {@link Connection.Builder}
* @return a newly created {@link Connection.Builder}.
*/
public @NotNull Connection.Builder connection() {
return new Connection.Builder();
Expand All @@ -59,7 +59,7 @@ public synchronized static void setResultMapper(@Nullable ObjectMapper mapper) {
* Creates a new connection builder and configures it with a db-url.
*
* @param dburl the db-url to configure the builder.
* @return a newly created {@link Connection.Builder}
* @return a newly created {@link Connection.Builder}.
*/
public @NotNull Connection.Builder connection(@NotNull String dburl) {
return connection(URI.create(dburl));
Expand All @@ -69,9 +69,20 @@ public synchronized static void setResultMapper(@Nullable ObjectMapper mapper) {
* Creates a new connection builder and configures it with a db-url.
*
* @param uri the db-url to configure the builder.
* @return a newly created {@link Connection.Builder}
* @return a newly created {@link Connection.Builder}.
*/
public @NotNull Connection.Builder connection(@NotNull URI uri) {
return new Connection.Builder(uri);
}

/**
* Copies a connection builder.
*
* @param b the original builder.
* @return a copy of the {@link Connection.Builder}.
*/
public @NotNull Connection.Builder connection(Connection.Builder b) {
return new Connection.Builder(b);
}

}
17 changes: 8 additions & 9 deletions src/main/java/com/rethinkdb/ast/Query.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.rethinkdb.ast;

import com.rethinkdb.RethinkDB;
import com.rethinkdb.gen.exc.ReqlRuntimeError;
import com.rethinkdb.gen.proto.QueryType;
import com.rethinkdb.model.OptArgs;
import com.rethinkdb.utils.Internals;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand All @@ -22,21 +22,20 @@
public class Query {
private static final Logger LOGGER = LoggerFactory.getLogger(Query.class);

public final QueryType type;
public final @NotNull QueryType type;
public final long token;
public final OptArgs globalOptions;

public final @Nullable ReqlAst term;
public final @Nullable OptArgs globalOptions;

public Query(QueryType type, long token, @Nullable ReqlAst term, OptArgs globalOptions) {
public Query(@NotNull QueryType type, long token, @Nullable ReqlAst term, @Nullable OptArgs globalOptions) {
this.type = type;
this.token = token;
this.term = term;
this.globalOptions = globalOptions;
}

public Query(QueryType type, long token) {
this(type, token, null, new OptArgs());
public Query(@NotNull QueryType type, long token) {
this(type, token, null, null);
}

public ByteBuffer serialize() {
Expand All @@ -47,8 +46,8 @@ public ByteBuffer serialize() {
if (term != null) {
list.add(term.build());
}
if (!globalOptions.isEmpty()) {
list.add(ReqlAst.buildOptarg(globalOptions));
if (globalOptions != null && !globalOptions.isEmpty()) {
list.add(ReqlAst.buildToMap(globalOptions));
}
String json = Internals.getInternalMapper().writeValueAsString(list);
byte[] bytes = json.getBytes(StandardCharsets.UTF_8);
Expand Down
Loading