Package com.surrealdb
Class QueryException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.surrealdb.SurrealException
com.surrealdb.ServerException
com.surrealdb.QueryException
- All Implemented Interfaces:
Serializable
Query execution failure (not executed, timed out, cancelled).
Details use the {kind, details?} format with variants defined
in QueryDetailKind.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns the timeout duration when the query timed out, as a map containing"secs"and"nanos"keys.booleanReturnstruewhen the query was cancelled.booleanReturnstruewhen the query was not executed (e.g.booleanReturnstruewhen the query timed out.Methods inherited from class com.surrealdb.ServerException
findCause, findCause, getDetails, getKind, getKindEnum, getServerCause, hasKind, hasKindMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Method Details
-
isNotExecuted
public boolean isNotExecuted()Returnstruewhen the query was not executed (e.g. a previous statement in a multi-statement query failed).- Returns:
- whether the detail kind is
NotExecuted
-
isTimedOut
public boolean isTimedOut()Returnstruewhen the query timed out.- Returns:
- whether the detail kind is
TimedOut
-
isCancelled
public boolean isCancelled()Returnstruewhen the query was cancelled.- Returns:
- whether the detail kind is
Cancelled
-
getTimeout
-