* Get rid of transitive dependency on commons-collections 3.2.1 by
updating hadoop version.
* Move hadoop dependency from `client` project to `hadoop` project.
There was a bug that only showed up in time zones with positive offset
from GMT. I've added explicit tests for time zones with positive and
negative offsets.
Because of the session cookie, only one asynchronous call can be
in-flight at a time. Violating that constraint is a bug in the client
app, so we throw an IllegalStateException to prevent race conditions.
To get the old synchronous behavior, append `.checkedGet()` to a call
that returns SQLFuture. For example:
```
Cursor cursor = vtgateConn.execute(...).checkedGet();
```
The valueOf() methods on java.sql.(Date|Time|Timestamp) don't support
MySQL-specific syntax, and will throw exceptions while parsing certain
values returned from MySQL. The toString() methods on those classes
also may produce results that a MySQL user would not want or expect.
This new class contains utility methods for working with MySQL DATE,
TIME, TIMESTAMP, and DATETIME formats, including MySQL-specific syntax.
Unlike the built-in valueOf() and toString() methods, these also support
time zones through the Calendar class, which is necessary when implementing
the JDBC PreparedStatement and ResultSet interfaces. When no Calendar is
specified, we use the default time zone like the built-in methods do.
The underlying protobuf field is not used in open-source and therefore we don't want to expose it in our API.
Since the protobuf field will no longer be set, proto3 should always return "false" as zero value for it.
This commit also removes the "asTransaction" flag from the transaction object ExecuteBatch* methods because vtgate ignores this flag anyway when the request is within a transaction.
Previously, getters that convert to primitive types
(like `long getLong()`) would throw NullPointerException if the value
was actually SQL NULL. To better match the expectations set by the JDBC
ResultSet interface, which we intend to mimic, we now will instead
return 0 when asked to convert SQL NULL to a primitive type.
To distinguish between 0 and SQL NULL, the JDBC ResultSet interface
provides two mechanisms, which we now support as well:
1. Call `wasNull()` after `getLong()` returns 0.
2. Call `getObject(..., Long.class)` instead of `getLong()`
to get a (possibly-null) `Long` instead of a `long`.
Specified dependeny for the Maven exec plugin (Travis tried to use an old location which no longer works).
Also added missing checking of the error code.
SocketAddress represents a socket address with no protocol attachment.
It is too general to be useful as often the subclass needs to know the
hostname and port info.
1. Move maven-compiler-plugin from sub packages to java/pom.xml.
2. Move row related methods from Cursor class to a new Row class, this
simplifies operations in Hadoop where it needs a wriable row object.
3. Refactor both SimpleCursor and StreamCursor to follow the Cursor change.
4. Add Hadoop package which depends on java/client and java/grpc.