-
Notifications
You must be signed in to change notification settings - Fork 70
1.7 changelog
This release includes some internal refactoring about errors and introduces a couple of public functions to be used for classifying driver returned errors (#28).
This release introduces more configuration options around TLS, connection related timeouts (lifetime, acquisition and socket timeouts) and a couple of API and behaviour changes. It also improves concurrency and reliability of the routing driver.
-
Config
structure now exposes the following new options.-
TrustStrategy
: Sets how the driver establishes trust with the Neo4j instance it is connected to (default:TrustAny(false)
, seeTrustAny()
,TrustSystem()
andTrustOnly()
for other options) -
MaxConnectionLifetime
: Maximum connection life time on pooled connections. Values less than or equal to 0 disables the lifetime check (default:1 * time.Hour
) -
ConnectionAcquisitionTimeout
: Maximum amount of time to either acquire an idle connection from the pool or create a new connection (when the pool is not full). Negative values result in an infinite wait time where 0 value results in no timeout which results in immediate failure when there are no available connections (default:1 * time.Minute
) -
SocketConnectTimeout
: Connect timeout that will be set on underlying sockets. Values less than or equal to 0 results in no timeout being applied (default:5 * time.Second
) -
SocketReceiveTimeout
: Receive timeout that will be set on underlying sockets. Values less than or equal to 0 results in no timeout being applied (default:0
) -
SocketSendTimeout
: Send timeout that will be set on underlying sockets. Values less than or equal to 0 results in no timeout being applied (default:0
) -
SocketKeepalive
: Whether to enable TCP keep alive on underlying sockets (default:true
)
-
-
Config.MaxTransactionRetryDuration
is now renamed asConfig.MaxTransactionRetryTime
to better align with the naming across other official drivers. -
Config.AddressResolver
is now changed to accept a function (func(address ServerAddress) []ServerAddress
) instead of an interface for ease of use. -
Result.Consume()
andResult.Summary()
now returnsnil
asResultSummary
on error.
This release adds support for Bolt V3. The transaction configuration API introduced in v1.7.0-beta01 is now fully functional when ran against a neo4j 3.5 version (currently pre-release).
The following features are introduced in Bolt V3;
- Both a transaction timeout and transaction metadata can be set with
Session.BeginTransaction
,Session.ReadTransaction
andSession.WriteTransaction
calls. These can be passed via variadic function arguments that mutatesTransactionConfig
struct -neo4j.WithTxTimeout
andneo4j.WithTxMetadata
are provided as part of driver API. - All of these transaction configuration options are now also applies to
Session.Run
calls (which are wrapped in auto-commit transactions on the server side) -
Session.Run
calls are now executed as part of the causal chain.
This release doesn't add any features but introduces public API changes.
- Statement parameters map (
params
parameter) that is sent withSession.Run
orTransaction.Run
is now of typemap[string]interface{}
and not a pointer. - All previous public struct types are converted into interfaces to support mocking for external testability. Also private functions on
Driver
interface are also removed for the same reason. -
CustomAuth
function now takes itsparameters
parameter as of typemap[string]interface{}
instead of a pointer. - Added API for transaction configuration which provides a means of setting transaction timeout and attaching transaction metadata to transactions on arbitrary explicit/auto-commit transactions. This is a placeholder functionality for now, underlying implementation will be introduced in upcoming releases.
- Improved API documentation.
Removed master
branch and made 1.7
the default which will hold the long run stable 1.7 driver release (the same applies to downstream - gobolt
and seabolt
)
- Renamed seabolt wrapper from
neo4j-go-connector
togobolt
(accessible at https://github.com/neo4j-drivers/gobolt) - Changed the package structure of the driver as per packaging guidelines and moved top level code into
neo4j
folder which can now be imported fromgithub.com/neo4j/neo4j-go-driver/neo4j
- Made the logger provided to the driver through
neo4j.Config
to be used across the whole stack (now you can get more useful log entries fromseabolt
- especially whenDEBUG
log level is enabled) - Added support for
bolt+routing
scheme to work against causal cluster deployments, yay! (all you need to do is to point your URL tobolt+routing://<hostname>:<port>
where<hostname>:<port>
pair points to one of the core servers in the cluster) - Added support for specifying custom
neo4j.ServerAddressResolver
throughneo4j.Config
that can map<hostname>:<port>
pair provided as part of the driver URL to multiple entries (i.e to provide all core server addresses) - so that all those mapped entries are tried in turn until routing table is fetched - Renamed spatial type constructor function
neo4j.NewPoint
toneo4j.NewPoint2D
for consistency - Enabled SNI extension on TLS sessions
- Added support for all temporal and spatial types that were introduced by Bolt version 2 (introduced as part of server release 3.4)
- Added support for returning Path types as return values
- Fixed an issue where node and relationship values returned from a query was not accessible through driver
- The first release of the Neo4j Official Go Driver. It only includes support for Bolt V1 (which means you cannot use temporal / spatial types introduced with Neo4j database 3.4 version) and works only on direct mode (no clustering support)