#[non_exhaustive]pub enum Db {
Show 233 variants
Unreachable(String),
Deprecated(String),
Thrown(String),
Ds(String),
Tx(String),
TxFailure,
TxFinished,
TxReadonly,
TxConditionNotMet,
TxKeyAlreadyExists,
TxKeyTooLarge,
TxValueTooLarge,
TxRetryable,
TxTooLarge,
NsEmpty,
DbEmpty,
QueryEmpty,
QueryRemaining,
InvalidQuery(RenderedError),
InvalidContent {
value: Value,
},
InvalidMerge {
value: Value,
},
InvalidPatch {
message: String,
},
PatchTest {
expected: String,
got: String,
},
HttpDisabled,
InvalidParam {
name: String,
},
InvalidField {
line: usize,
field: String,
},
InvalidFetch {
value: Value,
},
InvalidSplit {
line: usize,
field: String,
},
InvalidOrder {
line: usize,
field: String,
},
InvalidGroup {
line: usize,
field: String,
},
InvalidLimit {
value: String,
},
InvalidStart {
value: String,
},
InvalidScript {
message: String,
},
InvalidModel {
message: String,
},
InvalidFunction {
name: String,
message: String,
},
InvalidArguments {
name: String,
message: String,
},
InvalidAggregation {
name: String,
table: String,
message: String,
},
FunctionCheck {
name: String,
value: String,
check: String,
},
InvalidUrl(String),
InvalidVectorDimension {
current: usize,
expected: usize,
},
InvalidVectorDistance {
left: SharedVector,
right: SharedVector,
dist: f64,
},
InvalidVectorType {
current: String,
expected: &'static str,
},
InvalidVectorValue(String),
InvalidRegex(String),
InvalidTimeout(u64),
QueryTimedout,
QueryCancelled,
QueryNotExecuted,
QueryNotExecutedDetail {
message: String,
},
NsNotAllowed {
ns: String,
},
DbNotAllowed {
db: String,
},
NsNotFound {
value: String,
},
NlNotFound {
value: String,
},
DbNotFound {
value: String,
},
DlNotFound {
value: String,
},
EvNotFound {
value: String,
},
FcNotFound {
value: String,
},
FdNotFound {
value: String,
},
MlNotFound {
value: String,
},
NdNotFound {
value: String,
},
PaNotFound {
value: String,
},
CgNotFound {
value: String,
},
TbNotFound {
value: String,
},
LvNotFound {
value: String,
},
LqNotFound {
value: String,
},
AzNotFound {
value: String,
},
IxNotFound {
value: String,
},
IdNotFound {
value: String,
},
UnsupportedDistance(Distance),
UserRootNotFound {
value: String,
},
UserNsNotFound {
value: String,
ns: String,
},
UserDbNotFound {
value: String,
ns: String,
db: String,
},
RealtimeDisabled,
ComputationDepthExceeded,
InvalidStatementTarget {
value: String,
},
CreateStatement {
value: String,
},
UpsertStatement {
value: String,
},
UpdateStatement {
value: String,
},
RelateStatement {
value: String,
},
RelateStatementIn {
value: String,
},
RelateStatementId {
value: String,
},
RelateStatementOut {
value: String,
},
DeleteStatement {
value: String,
},
InsertStatement {
value: String,
},
InsertStatementIn {
value: String,
},
InsertStatementId {
value: String,
},
InsertStatementOut {
value: String,
},
LiveStatement {
value: String,
},
KillStatement {
value: String,
},
SingleOnlyOutput,
TablePermissions {
table: String,
},
ParamPermissions {
name: String,
},
FunctionPermissions {
name: String,
},
TableIsView {
table: String,
},
RecordExists {
thing: Thing,
},
IndexExists {
thing: Thing,
index: String,
value: String,
},
TableCheck {
thing: String,
relation: bool,
target_type: String,
},
FieldCheck {
thing: String,
value: String,
field: Idiom,
check: String,
},
FieldValue {
thing: String,
value: String,
field: Idiom,
check: String,
},
SetCheck {
value: String,
name: String,
check: String,
},
FieldReadonly {
thing: String,
field: Idiom,
},
FieldUndefined {
table: String,
field: Idiom,
},
IdInvalid {
value: String,
},
IdMismatch {
value: String,
},
InInvalid {
value: String,
},
InMismatch {
value: String,
},
InOverride {
value: String,
},
OutInvalid {
value: String,
},
OutMismatch {
value: String,
},
OutOverride {
value: String,
},
CoerceTo {
from: Value,
into: String,
},
ConvertTo {
from: Value,
into: String,
},
LengthInvalid {
kind: String,
size: usize,
},
TryAdd(String, String),
TrySub(String, String),
TryMul(String, String),
TryDiv(String, String),
TryRem(String, String),
TryPow(String, String),
TryNeg(String),
TryFrom(String, &'static str),
Http(String),
Channel(String),
Io(Error),
Encode(Error),
Decode(Error),
Revision(Error),
CorruptedIndex(&'static str),
NoIndexFoundForMatch {
value: String,
},
AnalyzerError(String),
HighlightError(String),
Bincode(Box<ErrorKind>),
FstError(Error),
Utf8Error(FromUtf8Error),
ObsError(Error),
ModelComputation(String),
FeatureNotYetImplemented {
feature: String,
},
DuplicatedMatchRef {
mr: u8,
},
TimestampOverflow(String),
Internal(String),
Unimplemented(String),
CorruptedVersionstampInKey(VersionStampError),
InvalidLevel(String),
IamError(Error),
ScriptingNotAllowed,
FunctionNotAllowed(String),
NetTargetNotAllowed(String),
TokenMakingFailed,
NoRecordFound,
SignupQueryFailed,
SigninQueryFailed,
MissingUserOrPass,
NoSigninTarget,
InvalidPass,
InvalidAuth,
UnexpectedAuth,
InvalidSignup,
UnknownAuth,
MissingTokenHeader(String),
MissingTokenClaim(String),
MissingStorageEngine,
ClAlreadyExists {
value: String,
},
AzAlreadyExists {
value: String,
},
DbAlreadyExists {
value: String,
},
EvAlreadyExists {
value: String,
},
FdAlreadyExists {
value: String,
},
FcAlreadyExists {
value: String,
},
IxAlreadyExists {
value: String,
},
MlAlreadyExists {
value: String,
},
NsAlreadyExists {
value: String,
},
PaAlreadyExists {
value: String,
},
CgAlreadyExists {
value: String,
},
TbAlreadyExists {
value: String,
},
NtAlreadyExists {
value: String,
},
DtAlreadyExists {
value: String,
},
UserRootAlreadyExists {
value: String,
},
UserNsAlreadyExists {
value: String,
ns: String,
},
UserDbAlreadyExists {
value: String,
ns: String,
db: String,
},
IndexAlreadyBuilding {
index: String,
},
ExpiredToken,
ExpiredSession,
NodeAgent(&'static str),
Serialization(String),
AccessRootAlreadyExists {
ac: String,
},
AccessNsAlreadyExists {
ac: String,
ns: String,
},
AccessDbAlreadyExists {
ac: String,
ns: String,
db: String,
},
AccessRootNotFound {
ac: String,
},
AccessGrantRootNotFound {
ac: String,
gr: String,
},
AccessNsNotFound {
ac: String,
ns: String,
},
AccessGrantNsNotFound {
ac: String,
gr: String,
ns: String,
},
AccessDbNotFound {
ac: String,
ns: String,
db: String,
},
AccessGrantDbNotFound {
ac: String,
gr: String,
ns: String,
db: String,
},
AccessLevelMismatch,
AccessMethodMismatch,
AccessNotFound,
AccessInvalidDuration,
AccessInvalidExpiration,
AccessRecordSignupQueryFailed,
AccessRecordSigninQueryFailed,
AccessRecordNoSignup,
AccessRecordNoSignin,
AccessBearerMissingKey,
AccessGrantBearerInvalid,
AccessGrantInvalidSubject,
AccessGrantRevoked,
TbInvalid {
value: String,
},
UnsupportedDestructure {
variant: String,
},
InvalidRangeValue {
expected: String,
found: String,
},
RangeTooBig {
max: usize,
},
InvalidStorageVersion,
OutdatedStorageVersion,
NonComputed,
QueryTooLarge,
ArithmeticOverflow(String),
ArithmeticNegativeOverflow(String),
InsufficientReserve(String),
QueryStream(String),
OrderingError(String),
InvalidExportConfig(Value, String),
InvalidBound {
found: String,
expected: String,
},
IdiomRecursionLimitExceeded {
limit: u32,
},
RepeatRecurseNotRecursing,
IdiomRecursionAlreadyRecursing {
symbol: String,
},
UnsupportedRepeatRecurse,
InvalidVersion {
found: Value,
},
RecursionInstructionPlanConflict,
DeleteRejectedByReference(String, String),
ReferenceTypeConflict(String),
RefsTypeConflict(String, String),
RefsMismatchingVariants,
RefsUpdateFailure(String, String),
InvalidRefsContext,
MismatchedFieldTypes {
name: String,
kind: String,
existing_name: String,
existing_kind: String,
},
}
Expand description
An error originating from an embedded SurrealDB database.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Unreachable(String)
The database encountered unreachable logic
Deprecated(String)
Statement has been deprecated
Thrown(String)
A custom error has been thrown
Ds(String)
There was a problem with the underlying datastore
Tx(String)
There was a problem with a datastore transaction
TxFailure
There was an error when starting a new datastore transaction
TxFinished
The transaction was already cancelled or committed
TxReadonly
The current transaction was created as read-only
TxConditionNotMet
The conditional value in the request was not equal
TxKeyAlreadyExists
The key being inserted in the transaction already exists
TxKeyTooLarge
The key exceeds a limit set by the KV store
TxValueTooLarge
The value exceeds a limit set by the KV store
TxRetryable
There was a transaction error that can be retried
TxTooLarge
The transaction writes too much data for the KV store
NsEmpty
No namespace has been selected
DbEmpty
No database has been selected
QueryEmpty
No SQL query has been specified
QueryRemaining
There was an error with the SQL query
InvalidQuery(RenderedError)
There was an error with the SQL query
InvalidContent
There was an error with the SQL query
InvalidMerge
There was an error with the SQL query
InvalidPatch
There was an error with the provided JSON Patch
PatchTest
Given test operation failed for JSON Patch
HttpDisabled
Remote HTTP request functions are not enabled
InvalidParam
it is not possible to set a variable with the specified name
InvalidField
InvalidFetch
The FETCH clause accepts idioms, strings and fields.
InvalidSplit
InvalidOrder
InvalidGroup
InvalidLimit
The LIMIT clause must evaluate to a positive integer
InvalidStart
The START clause must evaluate to a positive integer
InvalidScript
There was an error with the provided JavaScript code
InvalidModel
There was an error with the provided machine learning model
InvalidFunction
There was a problem running the specified function
InvalidArguments
The wrong quantity or magnitude of arguments was given for the specified function
InvalidAggregation
The wrong quantity or magnitude of arguments was given for the specified function
FunctionCheck
The wrong quantity or magnitude of arguments was given for the specified function
InvalidUrl(String)
The URL is invalid
InvalidVectorDimension
The size of the vector is incorrect
InvalidVectorDistance
The size of the vector is incorrect
InvalidVectorType
The size of the vector is incorrect
InvalidVectorValue(String)
The size of the vector is incorrect
InvalidRegex(String)
Invalid regular expression
InvalidTimeout(u64)
Invalid timeout
QueryTimedout
The query timedout
QueryCancelled
The query did not execute, because the transaction was cancelled
QueryNotExecuted
The query did not execute, because the transaction has failed
QueryNotExecutedDetail
The query did not execute, because the transaction has failed (with a message)
NsNotAllowed
The permissions do not allow for changing to the specified namespace
DbNotAllowed
The permissions do not allow for changing to the specified database
NsNotFound
The requested namespace does not exist
NlNotFound
The requested namespace login does not exist
DbNotFound
The requested database does not exist
DlNotFound
The requested database login does not exist
EvNotFound
The requested event does not exist
FcNotFound
The requested function does not exist
FdNotFound
The requested field does not exist
MlNotFound
The requested model does not exist
NdNotFound
The cluster node does not exist
PaNotFound
The requested param does not exist
CgNotFound
The requested config does not exist
TbNotFound
The requested table does not exist
LvNotFound
The requested live query does not exist
LqNotFound
The requested cluster live query does not exist
AzNotFound
The requested analyzer does not exist
IxNotFound
The requested analyzer does not exist
IdNotFound
The requested record does not exist
UnsupportedDistance(Distance)
UserRootNotFound
The requested root user does not exist
UserNsNotFound
The requested namespace user does not exist
UserDbNotFound
The requested database user does not exist
RealtimeDisabled
Unable to perform the realtime query
ComputationDepthExceeded
Reached excessive computation depth due to functions, subqueries, or futures
InvalidStatementTarget
Can not execute statement using the specified value
CreateStatement
Can not execute CREATE statement using the specified value
UpsertStatement
Can not execute UPSERT statement using the specified value
UpdateStatement
Can not execute UPDATE statement using the specified value
RelateStatement
Can not execute RELATE statement using the specified value
RelateStatementIn
Can not execute RELATE statement using the specified value
RelateStatementId
Can not execute RELATE statement using the specified value
RelateStatementOut
Can not execute RELATE statement using the specified value
DeleteStatement
Can not execute DELETE statement using the specified value
InsertStatement
Can not execute INSERT statement using the specified value
InsertStatementIn
Can not execute INSERT statement using the specified value
InsertStatementId
Can not execute INSERT statement using the specified value
InsertStatementOut
Can not execute INSERT statement using the specified value
LiveStatement
Can not execute LIVE statement using the specified value
KillStatement
Can not execute KILL statement using the specified id
SingleOnlyOutput
Can not execute CREATE statement using the specified value
TablePermissions
The permissions do not allow this query to be run on this table
ParamPermissions
The permissions do not allow this query to be run on this table
FunctionPermissions
The permissions do not allow this query to be run on this table
TableIsView
The specified table can not be written as it is setup as a foreign table view
RecordExists
A database entry for the specified record already exists
IndexExists
A database index entry for the specified record already exists
TableCheck
The specified table is not configured for the type of record being added
FieldCheck
The specified field did not conform to the field type check
FieldValue
The specified field did not conform to the field ASSERT clause
SetCheck
The specified value did not conform to the LET type check
FieldReadonly
The specified field did not conform to the field ASSERT clause
FieldUndefined
The specified field on a SCHEMAFUL table was not defined
IdInvalid
Found a record id for the record but this is not a valid id
IdMismatch
Found a record id for the record but we are creating a specific record
InInvalid
Found a record id for the record but this is not a valid id
InMismatch
Found a record id for the record but we are creating a specific record
InOverride
Found a record id for the record but we are creating a specific record
OutInvalid
Found a record id for the record but this is not a valid id
OutMismatch
Found a record id for the record but we are creating a specific record
OutOverride
Found a record id for the record but we are creating a specific record
CoerceTo
Unable to coerce to a value to another value
ConvertTo
Unable to convert a value to another value
LengthInvalid
Unable to coerce to a value to another value
TryAdd(String, String)
Cannot perform addition
TrySub(String, String)
Cannot perform subtraction
TryMul(String, String)
Cannot perform multiplication
TryDiv(String, String)
Cannot perform division
TryRem(String, String)
Cannot perform remainder
TryPow(String, String)
Cannot perform power
TryNeg(String)
Cannot perform negation
TryFrom(String, &'static str)
It’s is not possible to convert between the two types
Http(String)
There was an error processing a remote HTTP request
Channel(String)
There was an error processing a value in parallel
Io(Error)
Represents an underlying error with IO encoding / decoding
Encode(Error)
Represents an error when encoding a key-value entry
Decode(Error)
Represents an error when decoding a key-value entry
Revision(Error)
Represents an underlying error with versioned data encoding / decoding
CorruptedIndex(&'static str)
The index has been found to be inconsistent
NoIndexFoundForMatch
The query planner did not find an index able to support the match @@ for a given expression
AnalyzerError(String)
Represents an error when analyzing a value
HighlightError(String)
Represents an error when trying to highlight a value
Bincode(Box<ErrorKind>)
Represents an underlying error with Bincode serializing / deserializing
FstError(Error)
Represents an underlying error with FST
Utf8Error(FromUtf8Error)
Represents an underlying error while reading UTF8 characters
ObsError(Error)
Represents an underlying error with the Object Store
ModelComputation(String)
There was an error with model computation
FeatureNotYetImplemented
The feature has not yet being implemented
DuplicatedMatchRef
Duplicated match references are not allowed
TimestampOverflow(String)
Represents a failure in timestamp arithmetic related to database internals
Internal(String)
Internal server error This should be used extremely sporadically, since we lose the type of error as a consequence There will be times when it is useful, such as with unusual type conversion errors
Unimplemented(String)
Unimplemented functionality
CorruptedVersionstampInKey(VersionStampError)
InvalidLevel(String)
Invalid level
IamError(Error)
Represents an underlying IAM error
ScriptingNotAllowed
Scripting is not allowed
FunctionNotAllowed(String)
Function is not allowed
NetTargetNotAllowed(String)
Network target is not allowed
TokenMakingFailed
NoRecordFound
SignupQueryFailed
SigninQueryFailed
MissingUserOrPass
NoSigninTarget
InvalidPass
InvalidAuth
There was an error with authentication
This error hides different kinds of errors directly related to authentication
UnexpectedAuth
There was an unexpected error while performing authentication
This error hides different kinds of unexpected errors that may affect authentication
InvalidSignup
There was an error with signing up
UnknownAuth
Auth was expected to be set but was unknown
MissingTokenHeader(String)
Auth requires a token header which is missing
MissingTokenClaim(String)
Auth requires a token claim which is missing
MissingStorageEngine
The db is running without an available storage engine
ClAlreadyExists
AzAlreadyExists
The requested analyzer already exists
DbAlreadyExists
The requested database already exists
EvAlreadyExists
The requested event already exists
FdAlreadyExists
The requested field already exists
FcAlreadyExists
The requested function already exists
IxAlreadyExists
The requested index already exists
MlAlreadyExists
The requested model already exists
NsAlreadyExists
The requested namespace already exists
PaAlreadyExists
The requested param already exists
CgAlreadyExists
The requested config already exists
TbAlreadyExists
The requested table already exists
NtAlreadyExists
The requested namespace token already exists
DtAlreadyExists
The requested database token already exists
UserRootAlreadyExists
The requested user already exists
UserNsAlreadyExists
The requested namespace user already exists
UserDbAlreadyExists
The requested database user already exists
IndexAlreadyBuilding
A database index entry for the specified table is already building
ExpiredToken
The token has expired
ExpiredSession
The session has expired
NodeAgent(&'static str)
A node task has failed
Serialization(String)
The supplied type could not be serialiazed into sql::Value
AccessRootAlreadyExists
The requested root access method already exists
AccessNsAlreadyExists
The requested namespace access method already exists
AccessDbAlreadyExists
The requested database access method already exists
AccessRootNotFound
The requested root access method does not exist
AccessGrantRootNotFound
The requested root access grant does not exist
AccessNsNotFound
The requested namespace access method does not exist
AccessGrantNsNotFound
The requested namespace access grant does not exist
AccessDbNotFound
The requested database access method does not exist
AccessGrantDbNotFound
The requested database access grant does not exist
AccessLevelMismatch
The access method cannot be defined on the requested level
AccessMethodMismatch
AccessNotFound
AccessInvalidDuration
AccessInvalidExpiration
AccessRecordSignupQueryFailed
AccessRecordSigninQueryFailed
AccessRecordNoSignup
AccessRecordNoSignin
AccessBearerMissingKey
AccessGrantBearerInvalid
AccessGrantInvalidSubject
AccessGrantRevoked
TbInvalid
Found a table name for the record but this is not a valid table
UnsupportedDestructure
A destructuring variant was used in a context where it is not supported
InvalidRangeValue
Found an unexpected value in a range
RangeTooBig
Found an unexpected value in a range
InvalidStorageVersion
There was an invalid storage version stored in the database
OutdatedStorageVersion
There was an outdated storage version stored in the database
NonComputed
QueryTooLarge
ArithmeticOverflow(String)
Represents a failure in timestamp arithmetic related to database internals
ArithmeticNegativeOverflow(String)
Represents a negative value for a type that must be zero or positive
InsufficientReserve(String)
QueryStream(String)
OrderingError(String)
InvalidExportConfig(Value, String)
InvalidBound
Found an unexpected value in a range
IdiomRecursionLimitExceeded
Found an unexpected value in a range
RepeatRecurseNotRecursing
Found an unexpected value in a range
IdiomRecursionAlreadyRecursing
Found an unexpected value in a range
UnsupportedRepeatRecurse
Tried to use an idiom RepeatRecurse symbol in a position where it is not supported
InvalidVersion
RecursionInstructionPlanConflict
Tried to use an idiom RepeatRecurse symbol in a position where it is not supported
DeleteRejectedByReference(String, String)
The record cannot be deleted as it’s still referenced elsewhere
ReferenceTypeConflict(String)
The REFERENCE
keyword can only be used in combination with a type referencing a record
RefsTypeConflict(String, String)
The references
type cannot be used with other clauses altering or working with the value
RefsMismatchingVariants
The references
type cannot be used with other clauses altering or working with the value
RefsUpdateFailure(String, String)
Something went wrong while updating references
InvalidRefsContext
Cannot process Value::Refs
as there is no Record ID in the context for the operation
MismatchedFieldTypes
Implementations§
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<CaughtError<'_>> for Error
impl From<CaughtError<'_>> for Error
Source§fn from(e: CaughtError<'_>) -> Error
fn from(e: CaughtError<'_>) -> Error
Source§impl From<DecodeError> for Error
impl From<DecodeError> for Error
Source§fn from(_: DecodeError) -> Error
fn from(_: DecodeError) -> Error
Source§impl From<FromUtf8Error> for Error
impl From<FromUtf8Error> for Error
Source§fn from(source: FromUtf8Error) -> Error
fn from(source: FromUtf8Error) -> Error
Source§impl From<VersionStampError> for Error
impl From<VersionStampError> for Error
Source§fn from(source: VersionStampError) -> Error
fn from(source: VersionStampError) -> Error
Source§impl Serialize for Error
impl Serialize for Error
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
Blanket Implementations§
Source§impl<T> AsErrorSource for Twhere
T: Error + 'static,
impl<T> AsErrorSource for Twhere
T: Error + 'static,
Source§fn as_error_source(&self) -> &(dyn Error + 'static)
fn as_error_source(&self) -> &(dyn Error + 'static)
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more