Skip to content

v0.7.0 - 2015-04-14

Pre-release
Pre-release
Compare
Choose a tag to compare
@dancannon dancannon released this 14 Apr 18:33
· 569 commits to master since this 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 to ConnectOpts, when this value is true the driver will listen for new nodes added to the cluster.
  • Added the Addresses optional argument to ConnectOpts, this allows the driver to connect to multiple nodes in a cluster.
  • Added the IncludeStates optional argument to Changes.
  • Added MinVal and MaxVal 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 the Cursor, by default this value will be "Cursor" unless using a changefeed.
  • Changed the IndexesOf function to OffsetsOf .
  • 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