github.com/rethinkdb/rethinkdb-go
v4.0.0+incompatible
#1032 most downloaded on Go modules
rethinkdb/rethinkdb-go
What this package is like to depend on
Last release 9 years ago
no release in 18 months
Release timing varies
gaps range from 9 days to 5 months
Some releases are documented
notes for 25 of 44 stable releases
Nothing withdrawn
no release was ever pulled
12 years old
50 releases · first in 2014
0 releases in the last 12 months
see the full history below
Release timeline
50 releases · Jul 2014 to Dec 2017Releases
latest 50-
v4.0.0+incompatible14 Dec 2017Nothing published for this version
-
v3.0.5+incompatible28 Sep 2017Nothing published for this version
-
v3.0.4+incompatible04 Sep 2017Nothing published for this version
-
v3.0.3+incompatible03 Sep 2017Nothing published for this version
-
v3.0.2+incompatible17 Apr 2017Nothing published for this version
-
v3.0.1+incompatible30 Jan 2017Nothing published for this version
-
v3.0.0+incompatible06 Dec 2016Nothing published for this version
-
v2.2.2+incompatible25 Sep 2016Nothing published for this version
-
v2.2.1+incompatible20 Sep 2016Nothing published for this version
-
v2.2.0+incompatible17 Aug 2016Nothing published for this version
-
v2.1.3+incompatible01 Aug 2016Nothing published for this version
-
v2.1.2+incompatible22 Jul 2016Nothing published for this version
-
v2.1.1+incompatible12 Jul 2016Nothing published for this version
-
v2.1.0+incompatible26 Jun 2016Nothing published for this version
-
v2.0.4+incompatible22 May 2016Nothing published for this version
-
v2.0.3+incompatible12 May 2016Nothing published for this version
-
v2.0.2+incompatible18 Apr 2016Nothing published for this version
-
v2.0.1+incompatible14 Apr 2016Nothing published for this version
-
v2.0.0+incompatible13 Apr 2016Nothing published for this version
-
v1.4.2-0.20170416223114-4d301de25e1c16 Apr 2017 pre-releaseNothing published for this version
-
v1.4.102 Apr 2016Release notes
Open source →Fixed
- Fixed panic when closing a connection at the same time as using a changefeed.
- Update imports to correctly use gopkg.in
- Fixed race condition when using anonymous functions
- Fixed IsConflictErr and IsTypeErr panicking when passed nil errors
- RunWrite no longer misformats errors with formatting directives in them
-
v1.4.015 Mar 2016Release notes
Open source →Added
- Added the ability to reference subdocuments when inserting new documents, for more information see the documentation in the readme.
- Added the
SetTagsfunction which allows RethinkDB-go to override which tags are used when working with structs. For example to support thejsonadd the following callSetTags("gorethink", "json"). - Added helper functions for checking the error type of a write query, this is useful when calling
RunWrite.- Added
IsConflictErrwhich returns true when RethinkDB returns a duplicate key error. - Added
IsTypeErrwhich returns true when RethinkDB returns an unexpected type error.
- Added
- Added the
RawQueryterm which can be used to execute a raw JSON query, for more information about this query see the godoc. - Added the
NextResponsefunction toCursorwhich will return the next raw JSON response in the result set. - Added ability to set the keep alive period by setting the
KeepAlivePeriodfield inConnectOpts.
Fixed
- Fixed an issue that could prevent bad connections from being removed from the connection pool.
- Fixed certain connection errors not being returned as
RqlConnectionErrorwhen callingRun,ExecorRunWrite. - Fixed potential dead lock in connection code caused when building the query.
Release notes
Open source →Added
- Added the ability to reference subdocuments when inserting new documents, for more information see the documentation in the readme.
- Added the
SetTagsfunction which allows GoRethink to override which tags are used when working with structs. For example to support thejsonadd the following callSetTags("gorethink", "json"). - Added helper functions for checking the error type of a write query, this is useful when calling
RunWrite.- Added
IsConflictErrwhich returns true when RethinkDB returns a duplicate key error. - Added
IsTypeErrwhich returns true when RethinkDB returns an unexpected type error.
- Added
- Added the
RawQueryterm which can be used to execute a raw JSON query, for more information about this query see the godoc. - Added the
NextResponsefunction toCursorwhich will return the next raw JSON response in the result set. - Added ability to set the keep alive period by setting the
KeepAlivePeriodfield inConnectOpts.
Fixed
- Fixed an issue that could prevent bad connections from being removed from the connection pool.
- Fixed certain connection errors not being returned as
RqlConnectionErrorwhen callingRun,ExecorRunWrite. - Fixed potential dead lock in connection code caused when building the query.
-
v1.3.201 Feb 2016Release notes
Open source →Fixed
- Fixed race condition in cursor which caused issues when closing a cursor that is in the process of fetching data.
-
v1.3.122 Jan 2016Release notes
Open source →Added
- Added more documentation and examples for
GetAll.
Fixed
- Fixed
RunWritenot deferring its call toCursor.Close(). This could cause issues if an error occurred when decoding the result. - Fixed panic when calling
Error()on a RethinkDB-gorqlError.
Release notes
Open source →Added
- Added more documentation and examples for
GetAll.
Fixed
- Fixed
RunWritenot defering its call toCursor.Close(). This could cause issues if an error occurred when decoding the result. - Fixed panic when calling
Error()on a GoRethinkrqlError.
- Added more documentation and examples for
-
v1.3.011 Jan 2016Release notes
Open source →Added
- Added new error types, the following error types can now be returned:
RQLClientError,RQLCompileError,RQLDriverCompileError,RQLServerCompileError,RQLAuthError,RQLRuntimeError,RQLQueryLogicError,RQLNonExistenceError,RQLResourceLimitError,RQLUserError,RQLInternalError,RQLTimeoutError,RQLAvailabilityError,RQLOpFailedError,RQLOpIndeterminateError,RQLDriverError,RQLConnectionError. Please note that some other errors can be returned. - Added
IsConnectedfunction toSession.
Fixed
- Fixed panic when scanning through results caused by incorrect queue implementation.
- Added new error types, the following error types can now be returned:
-
v1.2.019 Nov 2015Release notes
Open source →Added
- Added
UUIDterm - Added
Valuesterm - Added
IncludeInitialandChangefeedQueueSizetoChangesOpts - Added
UseJSONNumbertoConnectOptswhich changes the way the JSON unmarshal works when deserializing JSON with interface{}, it's preferred to use json.Number instead float64 as it preserves the original precision. - Added
HostDecayDurationtoConnectOptsto configure how hosts are selected. For more information see the godoc.
Changed
- Timezones from
time.Timeare now stored in the database, before all times were stored as UTC. To convert a gotime.Timeback to UTC you can callt.In(time.UTC). - Improved host selection to use
hailocab/go-hostpoolto select nodes based on recent responses and timings. - Changed connection pool to use
fatih/poolinstead of a custom connection pool, this has caused some internal API changes and the behaviour ofMaxIdleandMaxOpenhas slightly changed. This change was made mostly to make driver maintenance easier.MaxIdlenow configures the initial size of the pool, the name of this field will likely change in the future.- Not setting
MaxOpenno longer creates an unbounded connection pool per host but instead creates a pool with a maximum capacity of 2 per host.
Deprecated
- Deprecated the option
NodeRefreshIntervalinConnectOpts - Deprecated
SetMaxIdleConnsandSetMaxOpenConns, these options should now only be set when creating the session.
Fixed
- Fixed some type aliases not being correctly encoded when using
Expr.
- Added
-
v1.1.402 Oct 2015Release notes
Open source →Added
- Added root table terms (
r.TableCreate,r.TableListandr.TableDrop)
Removed
- Removed
ReadModeoption fromRunOptsandExecOpts(incorrectly added in v1.1.0)
Fixed
- Fixed
Decodeno longer setting pointer to nil on document not found - Fixed panic when
fetchMorereturns an error - Fixed deadlock when closing changefeed
- Fixed stop query incorrectly waiting for response
- Fixed pointers not to be properly decoded
- Added root table terms (
-
v1.1.306 Sep 2015Release notes
Open source →Fixed
- Fixed pointers not to be properly decoded
- Fixed queries always timing out when Timeout ConnectOpt is set.
-
v1.1.228 Aug 2015 -
v1.1.121 Aug 2015Release notes
Open source →Fixed
- Corrected protobuf import
- Fixed documentation
- Fixed issues with time pseudotype conversion that caused issues with milliseconds
-
v1.1.019 Aug 2015Release notes
Open source →Added
- Replaced
UseOutdatedwithReadMode - Added
EmergencyRepairandNonVotingReplicaTagstoReconfigureOpts - Added
Unionas a root term - Added
Branchas a root term - Added
ReadTimeoutandWriteTimeouttoRunOptsandExecOpts - Exported
github.com/Sirupsen/logrus.LoggerasLog - Added support for encoding maps with non-string keys
- Added 'Round', 'Ceil' and 'Floor' terms
- Added race detector to CI
Changed
- Changed
Timeoutconnect argument to only configure the connection timeout. - Replaced
DbwithDBinRunOptsandExecOpts(Dbstill works for now) - Made
CursorandSessionsafe for concurrent use - Replaced
ErrClusterClosedwithErrConnectionClosed
- Replaced
-
v1.0.1-0.20150629204229-a719288a591d29 Jun 2015 pre-releaseNothing published for this version
-
v1.0.029 Jun 2015Release notes
Open source →1.0.0 is finally here, This is the first stable production ready release of RethinkDB-go!
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.
Added
- Added more documentation.
- Added
Shards,ReplicasandPrimaryReplicaTagoptional arguments inTableCreateOpts. - Added
MultiGroupandMultiGroupByIndexwhich are equivalent to the runninggroupwith themultioptional argument set to true.
Changed
- Renamed
DbtoDB. - Renamed
DbCreatetoDBCreate. - Renamed
DbDroptoDBDrop. - Renamed
RqlConnectionErrortoRQLConnectionError. - Renamed
RqlDriverErrortoRQLDriverError. - Renamed
RqlClientErrortoRQLClientError. - Renamed
RqlRuntimeErrortoRQLRuntimeError. - Renamed
RqlCompileErrortoRQLCompileError. - Renamed
JstoJS. - Renamed
JsontoJSON. - Renamed
HttptoHTTP. - Renamed
GeoJsontoGeoJSON. - Renamed
ToGeoJsontoToGeoJSON. - Renamed
WriteChangestoChangeResponse, this is now a general type and can be used when dealing with changefeeds. - Removed depth limit when encoding values using
Expr
Fixed
- Fixed issue causing errors when closing a changefeed cursor (#191)
- Fixed issue causing nodes to remain unhealthy when host discovery is disabled (#195)
- Fixed issue causing driver to fail when connecting to DB which did not have its canonical address set correctly (#200).
- Fixed ongoing queries not being properly stopped when closing the cursor.
Removed
- Removed
CacheSizeandDataCenteroptional arguments inTableCreateOpts. - Removed
CacheSizeoptional argument fromInsertOpts
Release notes
Open source →1.0.0 is finally here, This is the first stable production ready release of GoRethink!
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.
Added
- Added more documentation.
- Added
Shards,ReplicasandPrimaryReplicaTagoptional arguments inTableCreateOpts. - Added
MultiGroupandMultiGroupByIndexwhich are equivalent to the runninggroupwith themultioptional argument set to true.
Changed
- Renamed
DbtoDB. - Renamed
DbCreatetoDBCreate. - Renamed
DbDroptoDBDrop. - Renamed
RqlConnectionErrortoRQLConnectionError. - Renamed
RqlDriverErrortoRQLDriverError. - Renamed
RqlClientErrortoRQLClientError. - Renamed
RqlRuntimeErrortoRQLRuntimeError. - Renamed
RqlCompileErrortoRQLCompileError. - Renamed
JstoJS. - Renamed
JsontoJSON. - Renamed
HttptoHTTP. - Renamed
GeoJsontoGeoJSON. - Renamed
ToGeoJsontoToGeoJSON. - Renamed
WriteChangestoChangeResponse, this is now a general type and can be used when dealing with changefeeds. - Removed depth limit when encoding values using
Expr
Fixed
- Fixed issue causing errors when closing a changefeed cursor (#191)
- Fixed issue causing nodes to remain unhealthy when host discovery is disabled (#195)
- Fixed issue causing driver to fail when connecting to DB which did not have its canonical address set correctly (#200).
- Fixed ongoing queries not being properly stopped when closing the cursor.
Removed
- Removed
CacheSizeandDataCenteroptional arguments inTableCreateOpts. - Removed
CacheSizeoptional argument fromInsertOpts
-
v1.0.0-rc.322 Jun 2015 pre-releaseNothing published for this version
-
v1.0.0-rc.211 Jun 2015 pre-releaseNothing published for this version
-
v1.0.0-rc.107 Jun 2015 pre-releaseNothing published for this version
-
v0.7.205 May 2015Release notes
Open source →Added
- Added support for connecting to a server using TLS (#179)
Fixed
- Fixed issue causing driver to fail to connect to servers with the HTTP admin interface disabled (#181)
- Fixed errors in documentation (#182, #184)
- Fixed RunWrite not closing the cursor (#185)
-
v0.7.119 Apr 2015Release notes
Open source →Changed
- Improved logging of connection errors.
Fixed
- Fixed bug causing empty times to be inserted into the DB even when the omitempty tag was set.
- Fixed node status refresh loop leaking goroutines.
-
v0.7.014 Apr 2015Release notes
Open source →This release includes support for RethinkDB 2.0 and connecting to clusters. To connect to a cluster you should use the new
Addressesfield inConnectOpts, 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
DiscoverHostsoptional argument toConnectOpts, when this value istruethe driver will listen for new nodes added to the cluster. - Added the
Addressesoptional argument toConnectOpts, this allows the driver to connect to multiple nodes in a cluster. - Added the
IncludeStatesoptional argument toChanges. - Added
MinValandMaxValwhich represent the smallest and largest possible values. - Added the
Listencursor helper function which publishes database results to a channel. - Added support for optional arguments for the
Waitfunction. - Added the
Typefunction to theCursor, by default this value will be "Cursor" unless using a changefeed. - Changed the
IndexesOffunction toOffsetsOf. - 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
-
v0.6.304 Mar 2015Release notes
Open source →Added
- Add
IdentifierFormatoptarg toTableOpts(#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
- Add
-
v0.6.215 Feb 2015 -
v0.6.113 Feb 2015Release notes
Open source →- Reduce GC by using buffers when reading and writing
- Fixed encoding
time.Timeignoring milliseconds - Fixed pointers in structs that implement the
Marshaler/Unmarshalerinterfaces being ignored
Release notes
Open source →- Reduce GC by using buffers when reading and writing
- Fixed encoding
time.Timeignoring millseconds - Fixed pointers in structs that implement the
Marshaler/Unmarshalerinterfaces being ignored
-
v0.6.001 Feb 2015Release notes
Open source →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.
- Finished implementing the
Marshaler/Unmarshalerinterfaces - Connection pool overhauled. There were a couple of issues with connections in the previous releases so this release replaces the
fatih/poolpackage with a connection pool based on thedatabase/sqlconnection pool. - Another change is the removal of the prefetching mechanism as the connection+cursor logic was becoming quite complex and causing bugs, hopefully this will be added back in the near future but for now I am focusing my efforts on ensuring the driver is as stable as possible #130 #137
- Due to the above change the API for connecting has changed slightly (The API is now closer to the
database/sqlAPI.ConnectOptschanges:MaxActiverenamed toMaxOpenIdleTimeoutrenamed toTimeout
Cursors are now only closed automatically when calling eitherAllorOneExecnow takesExecOptsinstead ofRunOpts. The only difference is thatExechas theNoReplyfield
With that out the way here are the v1.16 changes:
- Added
Rangewhich generates all numbers from a given range - Added an optional squash argument to the changes command, which lets the server combine multiple changes to the same document (defaults to true)
- Added new admin functions (
Config,Rebalance,Reconfigure,Status,Wait) - Added support for
SUCCESS_ATOM_FEED - Added
MinIndex+MaxIndex functions - Added
ToJSONfunction - Updated
WriteResponsetype
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.
-
v0.5.1-0.20141102215928-16b174b489ff02 Nov 2014 pre-releaseNothing published for this version
-
v0.5.006 Oct 2014Release notes
Open source →- Added geospatial terms (
Circle,Distance,Fill,Geojson,ToGeojson,GetIntersecting,GetNearest,Includes,Intersects,Line,Point,Polygon,PolygonSub) - Added
UUIDterm for generating unique IDs - Added
AtIndexterm, combinesNthandGetField - Added the
Geometrytype, see the types package - Updated the
BatchConffield inRunOpts, now uses theBatchOptstype - Removed support for the
FieldMapperinterface
Internal Changes
- Fixed encoding performance issues, greatly improves writes/second
- Updated
Nextto zero the destination value every time it is called.
- Added geospatial terms (
-
v0.4.215 Sep 2014Release notes
Open source →- Fixed issue causing
Closeto start an infinite loop - Tidied up connection closing logic
- Fixed issue causing
-
v0.4.105 Sep 2014Release notes
Open source →- Fixed bug causing Pseudotypes to not be decoded properly (#117)
- Updated github.com/fatih/pool to v2 (#118)
-
v0.4.031 Aug 2014Release notes
Open source →- Updated the driver to support RethinkDB v1.14 (#116)
- Added the Binary data type
- Added the Binary command which takes a
[]byteorbytes.Buffer{}as an argument. - Added the
BinaryFormatoptional argument toRunOpts - Added the
GroupFormatoptional argument toRunOpts - Added the
ArrayLimitoptional argument toRunOpts - Renamed the
ReturnValsoptional argument toReturnChanges - Renamed the
Upsertoptional argument toConflict - Added the
IndexRenamecommand - Updated
Distinctto now take theIndexoptional argument (usingDistinctOpts)
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.217 Aug 2014Release notes
Open source →- Fixed issue causing connections not to be closed correctly (#109)
- Fixed issue causing terms in optional arguments to be encoded incorrectly (#114)
-
v0.3.114 Jul 2014Release notes
Open source →- Fixed "Token ## not in stream cache" error (#103)
- Changed Exec to no longer use NoReply. It now waits for the server to respond.