Skip to content

Commit a05fb9f

Browse files
committed
Merge branch 'release/v0.6.3'
2 parents c992dc8 + 6c1df23 commit a05fb9f

File tree

8 files changed

+38
-28
lines changed

8 files changed

+38
-28
lines changed

CHANGELOG.md

Lines changed: 30 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,29 @@
1-
# Changelog
1+
# Change Log
2+
All notable changes to this project will be documented in this file.
3+
This project adheres to [Semantic Versioning](http://semver.org/).
24

3-
## v0.6.2 - 15 Feb 2015
5+
6+
## v0.6.3 - 2015-03-04
7+
### Added
8+
- Add `IdentifierFormat` optarg to `TableOpts` (#158)
9+
10+
### Fixed
11+
- Fix struct alignment for ARM and x86-32 builds (#153)
12+
- Fix sprintf format for geometry error message (#157)
13+
- Fix duplicate if block (#159)
14+
- Fix incorrect assertion in decoder tests
15+
16+
## v0.6.2 - 2015-02-15
417

518
- Fixed `writeQuery` being too small when sending large queries
619

7-
## v0.6.1 - 13 Feb 2015
20+
## v0.6.1 - 2015-02-13
821

922
- Reduce GC by using buffers when reading and writing
1023
- Fixed encoding `time.Time` ignoring millseconds
1124
- Fixed pointers in structs that implement the `Marshaler`/`Unmarshaler` interfaces being ignored
1225

13-
## v0.6.0 - 1 Feb 2015
26+
## v0.6.0 - 2015-01-01
1427

1528
There are some major changes to the driver with this release that are not related to the RethinkDB v1.16 release. Please have a read through them:
1629
- Improvements to result decoding by caching reflection calls.
@@ -35,11 +48,11 @@ With that out the way here are the v1.16 changes:
3548

3649
Since this release has a lot of changes and although I have tested these changes sometimes things fall through the gaps. If you discover any bugs please let me know and I will try to fix them as soon as possible.
3750

38-
## Hotfix - 14 Dec 2014
51+
## v.0.5.1 - 2014-12-14
3952

4053
- Fixed empty slices being returned as `[]T(nil)` not `[]T{}` #138
4154

42-
## v0.5.0 - 6 Oct 2014
55+
## v0.5.0 - 2014-10-06
4356

4457
- Added geospatial terms (`Circle`, `Distance`, `Fill`, `Geojson`, `ToGeojson`, `GetIntersecting`, `GetNearest`, `Includes`, `Intersects`, `Line`, `Point`, `Polygon`, `PolygonSub`)
4558
- Added `UUID` term for generating unique IDs
@@ -48,21 +61,22 @@ Since this release has a lot of changes and although I have tested these changes
4861
- Updated the `BatchConf` field in `RunOpts`, now uses the `BatchOpts` type
4962
- Removed support for the `FieldMapper` interface
5063

51-
### Internal Changes
64+
Internal Changes
65+
5266
- Fixed encoding performance issues, greatly improves writes/second
5367
- Updated `Next` to zero the destination value every time it is called.
5468

55-
## v0.4.2 - 6 Sept 2014
69+
## v0.4.2 - 2014-09-06
5670

5771
- Fixed issue causing `Close` to start an infinite loop
5872
- Tidied up connection closing logic
5973

60-
## v0.4.1 - 5 Sept 2014
74+
## v0.4.1 - 2014-09-05
6175

6276
- Fixed bug causing Pseudotypes to not be decoded properly (#117)
6377
- Updated github.com/fatih/pool to v2 (#118)
6478

65-
## v0.4.0 - 13 Aug 2014
79+
## v0.4.0 - 2014-08-13
6680

6781
- Updated the driver to support RethinkDB v1.14 (#116)
6882
- Added the Binary data type
@@ -75,23 +89,23 @@ Since this release has a lot of changes and although I have tested these changes
7589
- Added the `IndexRename` command
7690
- Updated `Distinct` to now take the `Index` optional argument (using `DistinctOpts`)
7791

78-
### Internal Changes
92+
Internal Changes
7993

8094
- Updated to use the new JSON protocol
8195
- Switched the connection pool code to use github.com/fatih/pool
8296
- Added some benchmarks
8397

84-
## v0.3.2 - 17 Aug 2014
98+
## v0.3.2 - 2014-08-17
8599

86100
- Fixed issue causing connections not to be closed correctly (#109)
87101
- Fixed issue causing terms in optional arguments to be encoded incorrectly (#114)
88102

89-
## v0.3.1 - 14 June 2014
103+
## v0.3.1 - 2014-06-14
90104

91105
- Fixed "Token ## not in stream cache" error (#103)
92106
- Changed Exec to no longer use NoReply. It now waits for the server to respond.
93107

94-
## v0.3 (RethinkDB v1.13) - 26 June 2014
108+
## v0.3.0 - 2014-06-26
95109

96110
- Replaced `ResultRows`/`ResultRow` with `Cursor`, `Cursor` has the `Next`, `All` and `One` methods which stores the relevant value in the value pointed at by result. For more information check the examples.
97111
- Changed the time constants (Days and Months) to package globals instead of functions
@@ -103,7 +117,7 @@ Since this release has a lot of changes and although I have tested these changes
103117
- `EqJoin` now accepts a function as its first argument
104118
- `Nth` now returns a selection
105119

106-
## v0.2 (RethinkDB v1.12) - 13 April 2014
120+
## v0.2.0 - 2014-04-13
107121

108122
* Changed `Connect` to use `ConnectOpts` instead of `map[string]interface{}`
109123
* Migrated to new `Group`/`Ungroup` functions, these replace `GroupedMapReduce` and `GroupBy`
@@ -114,7 +128,7 @@ Since this release has a lot of changes and although I have tested these changes
114128
* Added `GROUPED_DATA` pseudotype
115129
* Fixed query printing
116130

117-
## v0.1 (RethinkDB v1.11) - 27 November 2013
131+
## v0.1.0 - 2013-11-27
118132

119133
* Added noreply writes
120134
* Added the new terms `index_status`, `index_wait` and `sync`

README.md

Lines changed: 1 addition & 1 deletion
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: v0.6.2 (RethinkDB v1.16)
10+
Current version: v0.6.3 (RethinkDB v1.16)
1111

1212
**Version 0.6 introduced some small API changes and some significant internal changes, for more information check the [change log](CHANGELOG.md) and please be aware the driver is not yet stable**
1313

connection.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ type Response struct {
2828
type Connection struct {
2929
conn net.Conn
3030
opts *ConnectOpts
31+
_ [4]byte
3132
token int64
3233
cursors map[int64]*Cursor
3334
bad bool
@@ -164,6 +165,7 @@ func (c *Connection) sendQuery(q Query) error {
164165
// getToken generates the next query token, used to number requests and match
165166
// responses with requests.
166167
func (c *Connection) nextToken() int64 {
168+
// requires c.token to be 64-bit aligned on ARM
167169
return atomic.AddInt64(&c.token, 1)
168170
}
169171

cursor.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -279,10 +279,6 @@ func (c *Cursor) IsNil() bool {
279279
return true
280280
}
281281

282-
if bufferedItem == nil {
283-
return true
284-
}
285-
286282
return false
287283
}
288284

doc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Go driver for RethinkDB
22
//
3-
// Current version: v0.6.2 (RethinkDB v1.16)
3+
// Current version: v0.6.3 (RethinkDB v1.16)
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_test.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package encoding
33
import (
44
"bytes"
55
"encoding/json"
6-
"fmt"
76
"image"
87
"reflect"
98
"testing"
@@ -149,7 +148,7 @@ var decodeTests = []decodeTest{
149148
{in: string("2"), ptr: new(interface{}), out: string("2")},
150149
{in: "a\u1234", ptr: new(string), out: "a\u1234"},
151150
{in: []interface{}{}, ptr: new([]string), out: []string{}},
152-
{in: map[string]interface{}{"X": []interface{}{1, 2, 3}, "Y": 4}, ptr: new(T), out: T{}, err: &DecodeTypeError{reflect.TypeOf([0]interface{}{}), reflect.TypeOf(""), ""}},
151+
{in: map[string]interface{}{"X": []interface{}{1, 2, 3}, "Y": 4}, ptr: new(T), out: T{}, err: &DecodeTypeError{reflect.TypeOf(""), reflect.TypeOf([]interface{}{}), ""}},
153152
{in: map[string]interface{}{"x": 1}, ptr: new(tx), out: tx{}},
154153
{in: map[string]interface{}{"F1": float64(1), "F2": 2, "F3": 3}, ptr: new(V), out: V{F1: float64(1), F2: int32(2), F3: string("3")}},
155154
{in: map[string]interface{}{"F1": string("1"), "F2": 2, "F3": 3}, ptr: new(V), out: V{F1: string("1"), F2: int32(2), F3: string("3")}},
@@ -256,9 +255,7 @@ func TestDecode(t *testing.T) {
256255
continue
257256
}
258257

259-
if !jsonEqual(v.Elem().Interface(), tt.out) {
260-
fmt.Printf("%#v\n", v.Elem().Interface())
261-
fmt.Printf("%#v\n", tt.out)
258+
if tt.err == nil && !jsonEqual(v.Elem().Interface(), tt.out) {
262259
t.Errorf("#%d: mismatch\nhave: %+v\nwant: %+v", i, v.Elem().Interface(), tt.out)
263260
continue
264261
}

pseudotypes.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,6 @@ func reqlGeometryToNativeGeometry(obj map[string]interface{}) (interface{}, erro
214214
}, nil
215215
}
216216
} else {
217-
return nil, fmt.Errorf("pseudo-type GEOMETRY object %v field has unknown type %s", typ)
217+
return nil, fmt.Errorf("pseudo-type GEOMETRY object %v field has unknown type %s", obj, typ)
218218
}
219219
}

query_select.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ func Db(args ...interface{}) Term {
1111

1212
type TableOpts struct {
1313
UseOutdated interface{} `gorethink:"use_outdated,omitempty"`
14+
IdentifierFormat interface{} `gorethink:"identifier_format,omitempty"`
1415
}
1516

1617
func (o *TableOpts) toMap() map[string]interface{} {

0 commit comments

Comments
 (0)