-
Notifications
You must be signed in to change notification settings - Fork 75
1.7 changelog
- Make transaction functions to retry at least 2 times on transient failures #55,
- Enable
neo4jscheme that will replacebolt+routingwithin upcoming major driver version #58.
- Improve allocations of timer objects in new gobolt workers #47,
- Update gobolt based on minor naming changes in seabolt,
- Update README based on latest seabolt improvements on windows,
- Pass access mode as part of the statement metadata for Bolt V3 connections.
- Buffer pending results on session close #42,
- Resolve inconsistencies and improve example codes included in documentation #44,
- Introduce worker pool in
goboltso that large number of concurrent goroutines executing neo4j queries (making seabolt calls) do not cause go runtime to crash #45.
Worker pool based connections are now used by default. To restore previous behaviour, you can set BOLTWORKERS environment variable to 0.
- Prevent panic in type conversion logic on nil pointer values #1,
- Improve error reporting on type conversion failures #2,
- Added
Gopkg.tomlandGopkg.lockfiles fordepsupport. - Added
seabolt_staticbuild tag togobolt, so that when you build your project with this tag - the output will be statically linked toseaboltand its dependencies. This feature is not available on Windows, so you'll face an error if you try to.
- Use
t_firstandt_lastmetadata fields which are available in Bolt V3. - Introduced
neo4j.Singleandneo4j.Collectfunctions to retrieveneo4j.Recordor[]neo4j.Recordfrom aSession.RunandTransaction.Run. To see how it can be used, have a look at this sample code. - Removed previously introduced
SocketReceiveTimeoutandSocketSendTimeoutconfiguration options.
This release includes improvements about error reporting #28 and #29.
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.
-
Configstructure 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.MaxTransactionRetryDurationis now renamed asConfig.MaxTransactionRetryTimeto better align with the naming across other official drivers. -
Config.AddressResolveris now changed to accept a function (func(address ServerAddress) []ServerAddress) instead of an interface for ease of use. -
Result.Consume()andResult.Summary()now returnsnilasResultSummaryon 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.ReadTransactionandSession.WriteTransactioncalls. These can be passed via variadic function arguments that mutatesTransactionConfigstruct -neo4j.WithTxTimeoutandneo4j.WithTxMetadataare provided as part of driver API. - All of these transaction configuration options are now also applies to
Session.Runcalls (which are wrapped in auto-commit transactions on the server side) -
Session.Runcalls are now executed as part of the causal chain.
This release doesn't add any features but introduces public API changes.
- Statement parameters map (
paramsparameter) that is sent withSession.RunorTransaction.Runis 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
Driverinterface are also removed for the same reason. -
CustomAuthfunction now takes itsparametersparameter 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-connectortogobolt(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
neo4jfolder which can now be imported fromgithub.com/neo4j/neo4j-go-driver/neo4j - Made the logger provided to the driver through
neo4j.Configto be used across the whole stack (now you can get more useful log entries fromseabolt- especially whenDEBUGlog level is enabled) - Added support for
bolt+routingscheme 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.ServerAddressResolverthroughneo4j.Configthat 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.NewPointtoneo4j.NewPoint2Dfor 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)