Skip to content

Commit

Permalink
Merge branch 'release/v0.6.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
dancannon committed Mar 4, 2015
2 parents c992dc8 + 6c1df23 commit a05fb9f
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 28 deletions.
46 changes: 30 additions & 16 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,29 @@
# Changelog
# Change Log
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## v0.6.2 - 15 Feb 2015

## v0.6.3 - 2015-03-04
### Added
- Add `IdentifierFormat` optarg to `TableOpts` (#158)

### Fixed
- Fix struct alignment for ARM and x86-32 builds (#153)
- Fix sprintf format for geometry error message (#157)
- Fix duplicate if block (#159)
- Fix incorrect assertion in decoder tests

## v0.6.2 - 2015-02-15

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

## v0.6.1 - 13 Feb 2015
## v0.6.1 - 2015-02-13

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

## v0.6.0 - 1 Feb 2015
## v0.6.0 - 2015-01-01

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:
- Improvements to result decoding by caching reflection calls.
Expand All @@ -35,11 +48,11 @@ With that out the way here are the v1.16 changes:

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.

## Hotfix - 14 Dec 2014
## v.0.5.1 - 2014-12-14

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

## v0.5.0 - 6 Oct 2014
## v0.5.0 - 2014-10-06

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

### Internal Changes
Internal Changes

- Fixed encoding performance issues, greatly improves writes/second
- Updated `Next` to zero the destination value every time it is called.

## v0.4.2 - 6 Sept 2014
## v0.4.2 - 2014-09-06

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

## v0.4.1 - 5 Sept 2014
## v0.4.1 - 2014-09-05

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

## v0.4.0 - 13 Aug 2014
## v0.4.0 - 2014-08-13

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

### Internal Changes
Internal Changes

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

## v0.3.2 - 17 Aug 2014
## v0.3.2 - 2014-08-17

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

## v0.3.1 - 14 June 2014
## v0.3.1 - 2014-06-14

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

## v0.3 (RethinkDB v1.13) - 26 June 2014
## v0.3.0 - 2014-06-26

- 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.
- Changed the time constants (Days and Months) to package globals instead of functions
Expand All @@ -103,7 +117,7 @@ Since this release has a lot of changes and although I have tested these changes
- `EqJoin` now accepts a function as its first argument
- `Nth` now returns a selection

## v0.2 (RethinkDB v1.12) - 13 April 2014
## v0.2.0 - 2014-04-13

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

## v0.1 (RethinkDB v1.11) - 27 November 2013
## v0.1.0 - 2013-11-27

* Added noreply writes
* Added the new terms `index_status`, `index_wait` and `sync`
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[Go](http://golang.org/) driver for [RethinkDB](http://www.rethinkdb.com/)


Current version: v0.6.2 (RethinkDB v1.16)
Current version: v0.6.3 (RethinkDB v1.16)

**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**

Expand Down
2 changes: 2 additions & 0 deletions connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ type Response struct {
type Connection struct {
conn net.Conn
opts *ConnectOpts
_ [4]byte
token int64
cursors map[int64]*Cursor
bad bool
Expand Down Expand Up @@ -164,6 +165,7 @@ func (c *Connection) sendQuery(q Query) error {
// getToken generates the next query token, used to number requests and match
// responses with requests.
func (c *Connection) nextToken() int64 {
// requires c.token to be 64-bit aligned on ARM
return atomic.AddInt64(&c.token, 1)
}

Expand Down
4 changes: 0 additions & 4 deletions cursor.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,10 +279,6 @@ func (c *Cursor) IsNil() bool {
return true
}

if bufferedItem == nil {
return true
}

return false
}

Expand Down
2 changes: 1 addition & 1 deletion doc.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Go driver for RethinkDB
//
// Current version: v0.6.2 (RethinkDB v1.16)
// Current version: v0.6.3 (RethinkDB v1.16)
// For more in depth information on how to use RethinkDB check out the API docs
// at http://rethinkdb.com/api
package gorethink
7 changes: 2 additions & 5 deletions encoding/decoder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package encoding
import (
"bytes"
"encoding/json"
"fmt"
"image"
"reflect"
"testing"
Expand Down Expand Up @@ -149,7 +148,7 @@ var decodeTests = []decodeTest{
{in: string("2"), ptr: new(interface{}), out: string("2")},
{in: "a\u1234", ptr: new(string), out: "a\u1234"},
{in: []interface{}{}, ptr: new([]string), out: []string{}},
{in: map[string]interface{}{"X": []interface{}{1, 2, 3}, "Y": 4}, ptr: new(T), out: T{}, err: &DecodeTypeError{reflect.TypeOf([0]interface{}{}), reflect.TypeOf(""), ""}},
{in: map[string]interface{}{"X": []interface{}{1, 2, 3}, "Y": 4}, ptr: new(T), out: T{}, err: &DecodeTypeError{reflect.TypeOf(""), reflect.TypeOf([]interface{}{}), ""}},
{in: map[string]interface{}{"x": 1}, ptr: new(tx), out: tx{}},
{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")}},
{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")}},
Expand Down Expand Up @@ -256,9 +255,7 @@ func TestDecode(t *testing.T) {
continue
}

if !jsonEqual(v.Elem().Interface(), tt.out) {
fmt.Printf("%#v\n", v.Elem().Interface())
fmt.Printf("%#v\n", tt.out)
if tt.err == nil && !jsonEqual(v.Elem().Interface(), tt.out) {
t.Errorf("#%d: mismatch\nhave: %+v\nwant: %+v", i, v.Elem().Interface(), tt.out)
continue
}
Expand Down
2 changes: 1 addition & 1 deletion pseudotypes.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,6 @@ func reqlGeometryToNativeGeometry(obj map[string]interface{}) (interface{}, erro
}, nil
}
} else {
return nil, fmt.Errorf("pseudo-type GEOMETRY object %v field has unknown type %s", typ)
return nil, fmt.Errorf("pseudo-type GEOMETRY object %v field has unknown type %s", obj, typ)
}
}
1 change: 1 addition & 0 deletions query_select.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ func Db(args ...interface{}) Term {

type TableOpts struct {
UseOutdated interface{} `gorethink:"use_outdated,omitempty"`
IdentifierFormat interface{} `gorethink:"identifier_format,omitempty"`
}

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

0 comments on commit a05fb9f

Please sign in to comment.