| 1 | package rethinkdbscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ |
| 2 | |
| 3 | import ( |
| 4 | "bytesscip-go gomod github.com/golang/go/src go1.14 bytes/" |
| 5 | "encoding/jsonscip-go gomod github.com/golang/go/src go1.14 `encoding/json`/" |
| 6 | "errorsscip-go gomod github.com/golang/go/src go1.14 errors/" |
| 7 | "fmtscip-go gomod github.com/golang/go/src go1.14 fmt/" |
| 8 | "stringsscip-go gomod github.com/golang/go/src go1.14 strings/" |
| 9 | |
| 10 | pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/ "gopkg.in/rethinkdb/rethinkdb-go.v6/ql2scip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/" |
| 11 | ) |
| 12 | |
| 13 | var ( |
| 14 | // ErrNoHosts is returned when no hosts to the Connect method. |
| 15 | ErrNoHostsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ErrNoHosts. = errorsscip-go gomod github.com/golang/go/src go1.14 errors/.Newscip-go gomod github.com/golang/go/src go1.14 errors/New().("no hosts provided") |
| 16 | // ErrNoConnectionsStarted is returned when the driver couldn't to any of |
| 17 | // the provided hosts. |
| 18 | ErrNoConnectionsStartedscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ErrNoConnectionsStarted. = errorsscip-go gomod github.com/golang/go/src go1.14 errors/.Newscip-go gomod github.com/golang/go/src go1.14 errors/New().("no connections were made when creating the session") |
| 19 | // ErrInvalidNode is returned when attempting to connect to a node which |
| 20 | // returns an invalid response. |
| 21 | ErrInvalidNodescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ErrInvalidNode. = errorsscip-go gomod github.com/golang/go/src go1.14 errors/.Newscip-go gomod github.com/golang/go/src go1.14 errors/New().("invalid node") |
| 22 | // ErrNoConnections is returned when there are no active connections in the |
| 23 | // clusters connection pool. |
| 24 | ErrNoConnectionsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ErrNoConnections. = errorsscip-go gomod github.com/golang/go/src go1.14 errors/.Newscip-go gomod github.com/golang/go/src go1.14 errors/New().("rethinkdb: no connections were available") |
| 25 | // ErrConnectionClosed is returned when trying to send a query with a connClosed |
| 26 | // connection. |
| 27 | ErrConnectionClosedscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ErrConnectionClosed. = errorsscip-go gomod github.com/golang/go/src go1.14 errors/.Newscip-go gomod github.com/golang/go/src go1.14 errors/New().("rethinkdb: the connection is closed") |
| 28 | // ErrQueryTimeout is returned when query context deadline exceeded. |
| 29 | ErrQueryTimeoutscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ErrQueryTimeout. = errorsscip-go gomod github.com/golang/go/src go1.14 errors/.Newscip-go gomod github.com/golang/go/src go1.14 errors/New().("rethinkdb: query timeout") |
| 30 | ) |
| 31 | |
| 32 | func printCarrotsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/printCarrots().(t Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#, frames []*pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Framescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Frame#) string { |
| 33 | var frame *pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Framescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Frame# |
| 34 | if len(frames) > 1 { |
| 35 | frame, frames = frames[0], frames[1:] |
| 36 | } else if len(frames) == 1 { |
| 37 | frame, frames = frames[0], []*pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Framescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Frame#{} |
| 38 | } |
| 39 | |
| 40 | for i, arg := range t.argsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#args. { |
| 41 | if frame.GetPosscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Frame#GetPos().() == int64(i) { |
| 42 | t.argsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#args.[i] = Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#{ |
| 43 | termTypescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#termType.: pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Term_DATUMscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Term_DATUM., |
| 44 | datascip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#data.: printCarrotsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/printCarrots().(arg, frames), |
| 45 | } |
| 46 | } |
| 47 | } |
| 48 | |
| 49 | for k, arg := range t.optArgsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#optArgs. { |
| 50 | if frame.GetOptscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Frame#GetOpt().() == k { |
| 51 | t.optArgsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#optArgs.[k] = Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#{ |
| 52 | termTypescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#termType.: pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Term_DATUMscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Term_DATUM., |
| 53 | datascip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#data.: printCarrotsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/printCarrots().(arg, frames), |
| 54 | } |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | b := &bytesscip-go gomod github.com/golang/go/src go1.14 bytes/.Bufferscip-go gomod github.com/golang/go/src go1.14 bytes/Buffer#{} |
| 59 | for _, c := range t.Stringscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#String().() { |
| 60 | if c != '^' { |
| 61 | b.WriteStringscip-go gomod github.com/golang/go/src go1.14 bytes/Buffer#WriteString().(" ") |
| 62 | } else { |
| 63 | b.WriteStringscip-go gomod github.com/golang/go/src go1.14 bytes/Buffer#WriteString().("^") |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | return b.Stringscip-go gomod github.com/golang/go/src go1.14 bytes/Buffer#String().() |
| 68 | } |
| 69 | |
| 70 | // Error constants |
| 71 | var ErrEmptyResultscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/ErrEmptyResult. = errorsscip-go gomod github.com/golang/go/src go1.14 errors/.Newscip-go gomod github.com/golang/go/src go1.14 errors/New().("The result does not contain any more rows") |
| 72 | |
| 73 | // Connection/Response errors |
| 74 | |
| 75 | // rqlResponseError is the base type for all errors, it formats both |
| 76 | // for the response and query if set. |
| 77 | type rqlServerErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/rqlServerError# struct { |
| 78 | responsescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/rqlServerError#response. *Responsescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Response# |
| 79 | termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/rqlServerError#term. *Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term# |
| 80 | } |
| 81 | |
| 82 | func (e rqlServerErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/rqlServerError#) Errorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/rqlServerError#Error().() string { |
| 83 | var err = "An error occurred" |
| 84 | if e.responsescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/rqlServerError#response. != nil { |
| 85 | jsonscip-go gomod github.com/golang/go/src go1.14 `encoding/json`/.Unmarshalscip-go gomod github.com/golang/go/src go1.14 `encoding/json`/Unmarshal().(e.responsescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/rqlServerError#response..Responsesscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Response#Responses.[0], &err) |
| 86 | } |
| 87 | |
| 88 | if e.termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/rqlServerError#term. == nil { |
| 89 | return fmtscip-go gomod github.com/golang/go/src go1.14 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.14 fmt/Sprintf().("rethinkdb: %s", err) |
| 90 | } |
| 91 | |
| 92 | return fmtscip-go gomod github.com/golang/go/src go1.14 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.14 fmt/Sprintf().("rethinkdb: %s in:\n%s", err, e.termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/rqlServerError#term..Stringscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#String().()) |
| 93 | |
| 94 | } |
| 95 | |
| 96 | func (e rqlServerErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/rqlServerError#) Stringscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/rqlServerError#String().() string { |
| 97 | return e.Errorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/rqlServerError#Error().() |
| 98 | } |
| 99 | |
| 100 | type rqlErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/rqlError# string |
| 101 | |
| 102 | func (e rqlErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/rqlError#) Errorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/rqlError#Error().() string { |
| 103 | return fmtscip-go gomod github.com/golang/go/src go1.14 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.14 fmt/Sprintf().("rethinkdb: %s", string(e)) |
| 104 | } |
| 105 | |
| 106 | func (e rqlErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/rqlError#) Stringscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/rqlError#String().() string { |
| 107 | return e.Errorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/rqlError#Error().() |
| 108 | } |
| 109 | |
| 110 | // Exported Error "Implementations" |
| 111 | |
| 112 | type RQLClientErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/RQLClientError# struct{ rqlServerErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/RQLClientError#rqlServerError. } |
| 113 | type RQLCompileErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/RQLCompileError# struct{ rqlServerErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/RQLCompileError#rqlServerError. } |
| 114 | type RQLDriverCompileErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/RQLDriverCompileError# struct{ RQLCompileErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/RQLDriverCompileError#RQLCompileError. } |
| 115 | type RQLServerCompileErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/RQLServerCompileError# struct{ RQLCompileErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/RQLServerCompileError#RQLCompileError. } |
| 116 | type RQLAuthErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/RQLAuthError# struct{ RQLDriverErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/RQLAuthError#RQLDriverError. } |
| 117 | type RQLRuntimeErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/RQLRuntimeError# struct{ rqlServerErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/RQLRuntimeError#rqlServerError. } |
| 118 | |
| 119 | type RQLQueryLogicErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/RQLQueryLogicError# struct{ RQLRuntimeErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/RQLQueryLogicError#RQLRuntimeError. } |
| 120 | type RQLNonExistenceErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/RQLNonExistenceError# struct{ RQLQueryLogicErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/RQLNonExistenceError#RQLQueryLogicError. } |
| 121 | type RQLResourceLimitErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/RQLResourceLimitError# struct{ RQLRuntimeErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/RQLResourceLimitError#RQLRuntimeError. } |
| 122 | type RQLUserErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/RQLUserError# struct{ RQLRuntimeErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/RQLUserError#RQLRuntimeError. } |
| 123 | type RQLInternalErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/RQLInternalError# struct{ RQLRuntimeErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/RQLInternalError#RQLRuntimeError. } |
| 124 | type RQLTimeoutErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/RQLTimeoutError# struct{ rqlServerErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/RQLTimeoutError#rqlServerError. } |
| 125 | type RQLAvailabilityErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/RQLAvailabilityError# struct{ RQLRuntimeErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/RQLAvailabilityError#RQLRuntimeError. } |
| 126 | type RQLOpFailedErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/RQLOpFailedError# struct{ RQLAvailabilityErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/RQLOpFailedError#RQLAvailabilityError. } |
| 127 | type RQLOpIndeterminateErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/RQLOpIndeterminateError# struct{ RQLAvailabilityErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/RQLOpIndeterminateError#RQLAvailabilityError. } |
| 128 | |
| 129 | // RQLDriverError represents an unexpected error with the driver, if this error |
| 130 | // persists please create an issue. |
| 131 | type RQLDriverErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/RQLDriverError# struct { |
| 132 | rqlErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/RQLDriverError#rqlError. |
| 133 | } |
| 134 | |
| 135 | // RQLConnectionError represents an error when communicating with the database |
| 136 | // server. |
| 137 | type RQLConnectionErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/RQLConnectionError# struct { |
| 138 | rqlErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/RQLConnectionError#rqlError. |
| 139 | } |
| 140 | |
| 141 | func createClientErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/createClientError().(response *Responsescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Response#, term *Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#) error { |
| 142 | return RQLClientErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/RQLClientError#{rqlServerErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/rqlServerError#{response, term}} |
| 143 | } |
| 144 | |
| 145 | func createCompileErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/createCompileError().(response *Responsescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Response#, term *Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#) error { |
| 146 | return RQLCompileErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/RQLCompileError#{rqlServerErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/rqlServerError#{response, term}} |
| 147 | } |
| 148 | |
| 149 | func createRuntimeErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/createRuntimeError().(errorType pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Response_ErrorTypescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Response_ErrorType#, response *Responsescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Response#, term *Termscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/Term#) error { |
| 150 | serverErr := rqlServerErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/rqlServerError#{response, term} |
| 151 | |
| 152 | switch errorType { |
| 153 | case pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Response_QUERY_LOGICscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Response_QUERY_LOGIC.: |
| 154 | return RQLQueryLogicErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/RQLQueryLogicError#{RQLRuntimeErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/RQLRuntimeError#{serverErr}} |
| 155 | case pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Response_NON_EXISTENCEscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Response_NON_EXISTENCE.: |
| 156 | return RQLNonExistenceErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/RQLNonExistenceError#{RQLQueryLogicErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/RQLQueryLogicError#{RQLRuntimeErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/RQLRuntimeError#{serverErr}}} |
| 157 | case pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Response_RESOURCE_LIMITscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Response_RESOURCE_LIMIT.: |
| 158 | return RQLResourceLimitErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/RQLResourceLimitError#{RQLRuntimeErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/RQLRuntimeError#{serverErr}} |
| 159 | case pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Response_USERscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Response_USER.: |
| 160 | return RQLUserErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/RQLUserError#{RQLRuntimeErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/RQLRuntimeError#{serverErr}} |
| 161 | case pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Response_INTERNALscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Response_INTERNAL.: |
| 162 | return RQLInternalErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/RQLInternalError#{RQLRuntimeErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/RQLRuntimeError#{serverErr}} |
| 163 | case pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Response_OP_FAILEDscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Response_OP_FAILED.: |
| 164 | return RQLOpFailedErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/RQLOpFailedError#{RQLAvailabilityErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/RQLAvailabilityError#{RQLRuntimeErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/RQLRuntimeError#{serverErr}}} |
| 165 | case pscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/.Response_OP_INDETERMINATEscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/ql2`/Response_OP_INDETERMINATE.: |
| 166 | return RQLOpIndeterminateErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/RQLOpIndeterminateError#{RQLAvailabilityErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/RQLAvailabilityError#{RQLRuntimeErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/RQLRuntimeError#{serverErr}}} |
| 167 | default: |
| 168 | return RQLRuntimeErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/RQLRuntimeError#{serverErr} |
| 169 | } |
| 170 | } |
| 171 | |
| 172 | // Error type helpers |
| 173 | |
| 174 | // IsConflictErr returns true if the error is non-nil and the query failed |
| 175 | // due to a duplicate primary key. |
| 176 | func IsConflictErrscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/IsConflictErr().(err error) bool { |
| 177 | if err == nil { |
| 178 | return false |
| 179 | } |
| 180 | |
| 181 | return stringsscip-go gomod github.com/golang/go/src go1.14 strings/.HasPrefixscip-go gomod github.com/golang/go/src go1.14 strings/HasPrefix().(err.Error(), "Duplicate primary key") |
| 182 | } |
| 183 | |
| 184 | // IsTypeErr returns true if the error is non-nil and the query failed due |
| 185 | // to a type error. |
| 186 | func IsTypeErrscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6`/IsTypeErr().(err error) bool { |
| 187 | if err == nil { |
| 188 | return false |
| 189 | } |
| 190 | |
| 191 | return stringsscip-go gomod github.com/golang/go/src go1.14 strings/.HasPrefixscip-go gomod github.com/golang/go/src go1.14 strings/HasPrefix().(err.Error(), "Expected type") |
| 192 | } |