Skip to content

Commit

Permalink
Update import path
Browse files Browse the repository at this point in the history
  • Loading branch information
dancannon committed Dec 6, 2016
1 parent 8f44e7a commit 417bade
Show file tree
Hide file tree
Showing 102 changed files with 195 additions and 190 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ go:

cache: apt

go_import_path: gopkg.in/dancannon/gorethink.v2
go_import_path: gopkg.in/gorethink/gorethink.v2

before_script:
- source /etc/lsb-release && echo "deb http://download.rethinkdb.com/apt $DISTRIB_CODENAME main" | sudo tee /etc/apt/sources.list.d/rethinkdb.list
Expand Down
11 changes: 7 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@ Unfortunately this will likely be the last release I plan to work on. This is du

I hope you understand my decision to step back from the project, if you have any questions or would be interested in take over some of the maintenance of the project please let me know. To make this process easier I have also decided to move the repository to the GoRethink organisation. All existing imports _should_ still work.

Thanks to everybody who got involved with this project over the last ~4 years and helped out, I have truly enjoyed the time I have spent building this library and I hope both RethinkDB and this driver manage to keep going.

### Changed

- Fixed behaviour when unmarshaling nil slices
- Moved project to `gorethink` organisation
- Fixed behaviour when unmarshaling nil slices

### Fixed

Expand Down Expand Up @@ -355,7 +358,7 @@ r.Connect(

1.0.0 is finally here, This is the first stable production ready release of GoRethink!

![GoRethink Logo](https://raw.github.com/wiki/dancannon/gorethink/gopher-and-thinker.png "Golang Gopher and RethinkDB Thinker")
![GoRethink Logo](https://raw.github.com/wiki/gorethink/gorethink/gopher-and-thinker.png "Golang Gopher and RethinkDB Thinker")

In an attempt to make this library more "idiomatic" some functions have been renamed, for the full list of changes and bug fixes see below.

Expand Down Expand Up @@ -421,15 +424,15 @@ if err != nil {
}
```

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](https://gist.github.com/dancannon/2865686d163ed78bbc3c)
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](https://gist.github.com/gorethink/2865686d163ed78bbc3c)

```go
cursor, err := r.Table("items").Changes()
ch := make(chan map[string]interface{})
cursor.Listen(ch)
```

For more details checkout the [README](https://github.com/dancannon/gorethink/blob/master/README.md) and [godoc](https://godoc.org/github.com/dancannon/gorethink). As always if you have any further questions send me a message on [Gitter](https://gitter.im/dancannon/gorethink).
For more details checkout the [README](https://github.com/gorethink/gorethink/blob/master/README.md) and [godoc](https://godoc.org/github.com/gorethink/gorethink). As always if you have any further questions send me a message on [Gitter](https://gitter.im/gorethink/gorethink).

- 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.
Expand Down
30 changes: 16 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
# GoRethink - RethinkDB Driver for Go

[![GitHub tag](https://img.shields.io/github/tag/dancannon/gorethink.svg?style=flat)](https://github.com/dancannon/gorethink/releases)
[![GoDoc](https://godoc.org/github.com/dancannon/gorethink?status.png)](https://godoc.org/github.com/dancannon/gorethink)
[![build status](https://img.shields.io/travis/dancannon/gorethink/master.svg "build status")](https://travis-ci.org/dancannon/gorethink)
[![GitHub tag](https://img.shields.io/github/tag/gorethink/gorethink.svg?style=flat)](https://github.com/gorethink/gorethink/releases)
[![GoDoc](https://godoc.org/github.com/gorethink/gorethink?status.png)](https://godoc.org/github.com/gorethink/gorethink)
[![build status](https://img.shields.io/travis/gorethink/gorethink/master.svg "build status")](https://travis-ci.org/gorethink/gorethink)
[![No Maintenance Intended](http://unmaintained.tech/badge.svg)](http://unmaintained.tech/)

[Go](http://golang.org/) driver for [RethinkDB](http://www.rethinkdb.com/)

![GoRethink Logo](https://raw.github.com/wiki/dancannon/gorethink/gopher-and-thinker-s.png "Golang Gopher and RethinkDB Thinker")
![GoRethink Logo](https://raw.github.com/wiki/gorethink/gorethink/gopher-and-thinker-s.png "Golang Gopher and RethinkDB Thinker")

Current version: v2.2.2 (RethinkDB v2.3)
Current version: v3.0.0 (RethinkDB v2.3)

This project is no longer maintained, for more information see the [v3.0.0 release](https://github.com/gorethink/gorethink/releases/tag/v3.0.0)

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).

Expand All @@ -18,13 +20,13 @@ If you need any help you can find me on the [RethinkDB slack](http://slack.rethi
## Installation

```
go get gopkg.in/dancannon/gorethink.v2
go get gopkg.in/gorethink/gorethink.v2
```

(Or v1)

```sh
go get gopkg.in/dancannon/gorethink.v1
go get gopkg.in/gorethink/gorethink.v1
```

## Example
Expand All @@ -37,7 +39,7 @@ import (
"fmt"
"log"

r "gopkg.in/dancannon/gorethink.v2"
r "gopkg.in/gorethink/gorethink.v2"
)

func Example() {
Expand Down Expand Up @@ -86,7 +88,7 @@ func ExampleConnect() {
}
```

See the [documentation](http://godoc.org/github.com/dancannon/gorethink#Connect) for a list of supported arguments to Connect().
See the [documentation](http://godoc.org/github.com/gorethink/gorethink#Connect) for a list of supported arguments to Connect().

### Connection Pool

Expand Down Expand Up @@ -165,7 +167,7 @@ Please note that `DiscoverHosts` will not work with user authentication at this

This library is based on the official drivers so the code on the [API](http://www.rethinkdb.com/api/) page should require very few changes to work.

To view full documentation for the query functions check the [API reference](https://github.com/dancannon/gorethink/wiki/Go-ReQL-command-reference) or [GoDoc](http://godoc.org/github.com/dancannon/gorethink#Term)
To view full documentation for the query functions check the [API reference](https://github.com/gorethink/gorethink/wiki/Go-ReQL-command-reference) or [GoDoc](http://godoc.org/github.com/gorethink/gorethink#Term)

Slice Expr Example
```go
Expand Down Expand Up @@ -308,7 +310,7 @@ If you wish to use the `json` tags for GoRethink then you can call `SetTags("gor
RethinkDB contains some special types which can be used to store special value types, currently supports are binary values, times and geometry data types. GoRethink supports these data types natively however there are some gotchas:
- Time types: To store times in RethinkDB with GoRethink you must pass a `time.Time` value to your query, due to the way Go works type aliasing or embedding is not support here
- Binary types: To store binary data pass a byte slice (`[]byte`) to your query
- Geometry types: As Go does not include any built-in data structures for storing geometry data GoRethink includes its own in the `github.com/dancannon/gorethink/types` package, Any of the types (`Geometry`, `Point`, `Line` and `Lines`) can be passed to a query to create a RethinkDB geometry type.
- Geometry types: As Go does not include any built-in data structures for storing geometry data GoRethink includes its own in the `github.com/gorethink/gorethink/types` package, Any of the types (`Geometry`, `Point`, `Line` and `Lines`) can be passed to a query to create a RethinkDB geometry type.

### Compound Keys

Expand Down Expand Up @@ -392,9 +394,9 @@ r.Table("books").Get("book_1").Merge(func(p r.Term) interface{} {

### Custom `Marshaler`s/`Unmarshaler`s

Sometimes the default behaviour for converting Go types to and from ReQL is not desired, for these situations the driver allows you to implement both the [`Marshaler`](https://godoc.org/github.com/dancannon/gorethink/encoding#Marshaler) and [`Unmarshaler`](https://godoc.org/github.com/dancannon/gorethink/encoding#Unmarshaler) interfaces. These interfaces might look familiar if you are using to using the `encoding/json` package however instead of dealing with `[]byte` the interfaces deal with `interface{}` values (which are later encoded by the `encoding/json` package when communicating with the database).
Sometimes the default behaviour for converting Go types to and from ReQL is not desired, for these situations the driver allows you to implement both the [`Marshaler`](https://godoc.org/github.com/gorethink/gorethink/encoding#Marshaler) and [`Unmarshaler`](https://godoc.org/github.com/gorethink/gorethink/encoding#Unmarshaler) interfaces. These interfaces might look familiar if you are using to using the `encoding/json` package however instead of dealing with `[]byte` the interfaces deal with `interface{}` values (which are later encoded by the `encoding/json` package when communicating with the database).

An good example of how to use these interfaces is in the [`types`](https://github.com/dancannon/gorethink/blob/master/types/geometry.go#L84-L106) package, in this package the `Point` type is encoded as the `GEOMETRY` pseudo-type instead of a normal JSON object.
An good example of how to use these interfaces is in the [`types`](https://github.com/gorethink/gorethink/blob/master/types/geometry.go#L84-L106) package, in this package the `Point` type is encoded as the `GEOMETRY` pseudo-type instead of a normal JSON object.

## Logging

Expand Down Expand Up @@ -478,7 +480,7 @@ BenchmarkSequentialSoftWritesParallel10 10000 263

## Examples

Many functions have examples and are viewable in the godoc, alternatively view some more full features examples on the [wiki](https://github.com/dancannon/gorethink/wiki/Examples).
Many functions have examples and are viewable in the godoc, alternatively view some more full features examples on the [wiki](https://github.com/gorethink/gorethink/wiki/Examples).

Another good place to find examples are the tests, almost every term will have a couple of tests that demonstrate how they can be used.

Expand Down
2 changes: 1 addition & 1 deletion checkers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

test "gopkg.in/check.v1"

"gopkg.in/dancannon/gorethink.v2/types"
"gopkg.in/gorethink/gorethink.v2/types"
)

type jsonChecker struct {
Expand Down
2 changes: 1 addition & 1 deletion connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"sync/atomic"
"time"

p "gopkg.in/dancannon/gorethink.v2/ql2"
p "gopkg.in/gorethink/gorethink.v2/ql2"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion connection_handshake.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (

"golang.org/x/crypto/pbkdf2"

p "gopkg.in/dancannon/gorethink.v2/ql2"
p "gopkg.in/gorethink/gorethink.v2/ql2"
)

type HandshakeVersion int
Expand Down
4 changes: 2 additions & 2 deletions cursor.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"reflect"
"sync"

"gopkg.in/dancannon/gorethink.v2/encoding"
p "gopkg.in/dancannon/gorethink.v2/ql2"
"gopkg.in/gorethink/gorethink.v2/encoding"
p "gopkg.in/gorethink/gorethink.v2/ql2"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion doc.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Package gorethink implements a Go driver for RethinkDB
//
// Current version: v2.2.2 (RethinkDB v2.3)
// Current version: v3.0.0 (RethinkDB v2.3)
// For more in depth information on how to use RethinkDB check out the API docs
// at http://rethinkdb.com/api
package gorethink
2 changes: 1 addition & 1 deletion errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"fmt"
"strings"

p "gopkg.in/dancannon/gorethink.v2/ql2"
p "gopkg.in/gorethink/gorethink.v2/ql2"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion example_connect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"log"
"os"

r "gopkg.in/dancannon/gorethink.v2"
r "gopkg.in/gorethink/gorethink.v2"
)

var session *r.Session
Expand Down
2 changes: 1 addition & 1 deletion example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"log"

r "gopkg.in/dancannon/gorethink.v2"
r "gopkg.in/gorethink/gorethink.v2"
)

func Example() {
Expand Down
2 changes: 1 addition & 1 deletion gorethink.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/Sirupsen/logrus"

"gopkg.in/dancannon/gorethink.v2/encoding"
"gopkg.in/gorethink/gorethink.v2/encoding"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions internal/reql_tests/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"time"

"github.com/stretchr/testify/suite"
r "gopkg.in/dancannon/gorethink.v2"
"gopkg.in/dancannon/gorethink.v2/internal/compare"
r "gopkg.in/gorethink/gorethink.v2"
"gopkg.in/gorethink/gorethink.v2/internal/compare"
)

func maybeRun(query interface{}, session *r.Session, opts r.RunOpts) interface{} {
Expand Down
2 changes: 1 addition & 1 deletion internal/reql_tests/gorethink_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"flag"
"os"

r "gopkg.in/dancannon/gorethink.v2"
r "gopkg.in/gorethink/gorethink.v2"
)

var url string
Expand Down
4 changes: 2 additions & 2 deletions internal/reql_tests/reql_aggregation_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions internal/reql_tests/reql_changefeeds_edge_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions internal/reql_tests/reql_changefeeds_idxcopy_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions internal/reql_tests/reql_changefeeds_include_states_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions internal/reql_tests/reql_changefeeds_point_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions internal/reql_tests/reql_changefeeds_table_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions internal/reql_tests/reql_control_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions internal/reql_tests/reql_datum_array_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions internal/reql_tests/reql_datum_binary_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions internal/reql_tests/reql_datum_bool_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions internal/reql_tests/reql_datum_null_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions internal/reql_tests/reql_datum_number_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions internal/reql_tests/reql_datum_object_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 417bade

Please sign in to comment.