Skip to content

Commit 6df8f5e

Browse files
committed
Merge branch 'release/v1.0.0-rc.3'
2 parents ed3d1fd + c483f86 commit 6df8f5e

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

5+
## v1.0.0 RC3 - 2015-06-22
6+
7+
### Changed
8+
- Reverted change that added sorting to maps when decoding due to performance concerts, instead documented that struct tags should be used. Especially when using a field named `Id`.
9+
510
## v1.0.0 RC2 - 2015-06-11
611

712
### Fixed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
[Go](http://golang.org/) driver for [RethinkDB](http://www.rethinkdb.com/)
88

99

10-
Current version: v1.0.0 RC2 (RethinkDB v2.0)
10+
Current version: v1.0.0 RC3 (RethinkDB v2.0)
1111

1212
Please note that this version of the driver only supports versions of RethinkDB using the v0.4 protocol (any versions of the driver older than RethinkDB 2.0 will not work).
1313

@@ -82,7 +82,7 @@ if err != nil {
8282
}
8383
```
8484

85-
When `DiscoverHosts` is true any nodes are added to the cluster after the initial connection then the new node will be added to the pool of available nodes used by GoRethink.
85+
When `DiscoverHosts` is true any nodes are added to the cluster after the initial connection then the new node will be added to the pool of available nodes used by GoRethink. Unfortunately the canonical address of each server in the cluster **MUST** be set as otherwise clients will try to connect to the database nodes locally. For more information about how to set a RethinkDB servers canonical address set this page http://www.rethinkdb.com/docs/config-file/.
8686

8787

8888
## Query Functions
@@ -205,6 +205,8 @@ Field int `gorethink:"myName,omitempty"`
205205
Field int `gorethink:",omitempty"`
206206
```
207207

208+
**NOTE:** It is strongly recommended that struct tags are used to explicitly define the mapping between your Go type and how the data is stored by RethinkDB. This is especially important when using an `Id` field as by default RethinkDB will create a field named `id` as the primary key (note that the RethinkDB field is lowercase but the Go version starts with a capital letter).
209+
208210
## Benchmarks
209211

210212
Everyone wants their project's benchmarks to be speedy. And while we know that rethinkDb and the gorethink driver are quite fast, our primary goal is for our benchmarks to be correct. They are designed to give you, the user, an accurate picture of writes per second (w/s). If you come up with a accurate test that meets this aim, submit a pull request please.

doc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Package gorethink implements a Go driver for RethinkDB
22
//
3-
// Current version: v1.0.0-rc.2 (RethinkDB v2.0)
3+
// Current version: v1.0.0-rc.3 (RethinkDB v2.0)
44
// For more in depth information on how to use RethinkDB check out the API docs
55
// at http://rethinkdb.com/api
66
package gorethink

encoding/decoder_types.go

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"bytes"
55
"fmt"
66
"reflect"
7-
"sort"
87
"strconv"
98
)
109

@@ -443,10 +442,7 @@ func (d *mapAsMapDecoder) decode(dv, sv reflect.Value) {
443442
keyType := dv.Type().Key()
444443
elemType := dv.Type().Elem()
445444

446-
keys := sv.MapKeys()
447-
sort.Sort(valueByString(keys))
448-
449-
for _, sElemKey := range keys {
445+
for _, sElemKey := range sv.MapKeys() {
450446
var dElemKey reflect.Value
451447
var dElemVal reflect.Value
452448

@@ -482,10 +478,7 @@ type mapAsStructDecoder struct {
482478
}
483479

484480
func (d *mapAsStructDecoder) decode(dv, sv reflect.Value) {
485-
keys := sv.MapKeys()
486-
sort.Sort(valueByString(keys))
487-
488-
for _, kv := range keys {
481+
for _, kv := range sv.MapKeys() {
489482
var f *field
490483
var fieldDec decoderFunc
491484
key := []byte(kv.String())

0 commit comments

Comments
 (0)