v0.7.0 - 2015-04-14
Pre-release
Pre-release
This release includes support for RethinkDB 2.0 and connecting to clusters. To connect to a cluster you should use the new Addresses
field in ConnectOpts
, for example:
session, err := r.Connect(r.ConnectOpts{
Addresses: []string{"localhost:28015", "localhost:28016"},
})
if err != nil {
log.Fatalln(err.Error())
}
Also added was the ability to read from a cursor using a channel, this is especially useful when using changefeeds. For more information see this gist
cursor, err := r.Table("items").Changes()
ch := make(chan map[string]interface{})
cursor.Listen(ch)
For more details checkout the README and godoc. As always if you have any further questions send me a message on Gitter.
- Added the ability to connect to multiple nodes, queries are then distributed between these nodes. If a node stops responding then queries stop being sent to this node.
- Added the
DiscoverHosts
optional argument toConnectOpts
, when this value istrue
the driver will listen for new nodes added to the cluster. - Added the
Addresses
optional argument toConnectOpts
, this allows the driver to connect to multiple nodes in a cluster. - Added the
IncludeStates
optional argument toChanges
. - Added
MinVal
andMaxVal
which represent the smallest and largest possible values. - Added the
Listen
cursor helper function which publishes database results to a channel. - Added support for optional arguments for the
Wait
function. - Added the
Type
function to theCursor
, by default this value will be "Cursor" unless using a changefeed. - Changed the
IndexesOf
function toOffsetsOf
. - Changed driver to use the v0.4 protocol (used to use v0.3).
- Fixed geometry tests not properly checking the expected results.
- Fixed bug causing nil pointer panics when using an
Unmarshaler
- Fixed dropped millisecond precision if given value is too old