clickhouse.go
clickhouse.go - Overview
-
Overview Defines custom error types related to resource limits in ClickHouse, including
ErrResourceBytesLimitExceeded
,ErrResourceTimeLimitExceeded
, andResourceLimitError
, along with functions to create, check, and marshal/unmarshal these errors. -
Detailed Documentation
ErrResourceBytesLimitExceeded
- Purpose: An error indicating that the resource bytes limit has been exceeded.
- Type:
error
- Value: A
ResourceLimitError
with a specific message.
ErrResourceTimeLimitExceeded
- Purpose: An error indicating that the resource time limit has been exceeded.
- Type:
error
- Value: A
ResourceLimitError
with a specific message.
ResourceLimitError
- Purpose: A custom error type to represent resource limit errors.
- Fields:
err
: The underlying error. Type:error
.
NewResourceLimitError
- Purpose: Creates a new
ResourceLimitError
. - Parameters:
err
: The underlying error. Type:error
.
- Returns: An error of type
*ResourceLimitError
.
(*ResourceLimitError) Error
- Purpose: Returns the error message of the underlying error.
- Returns: The error message as a string. Type:
string
.
(*ResourceLimitError) Unwrap
- Purpose: Returns the underlying error.
- Returns: The underlying error. Type:
error
.
IsResourceLimitError
- Purpose: Checks if an error is a
ResourceLimitError
. - Parameters:
err
: The error to check. Type:error
.
- Returns:
true
if the error is aResourceLimitError
,false
otherwise. Type:bool
.
(*ResourceLimitError) MarshalJSON
- Purpose: Marshals the error to JSON.
- Returns: A JSON representation of the error. Type:
[]byte
,error
.
(*ResourceLimitError) UnmarshalJSON
- Purpose: Unmarshals JSON to the error.
- Parameters:
[]byte
: the json value to unmarshal.
- Returns: An error, always
nil
in the current implementation. Type:error
.
-
Code Examples N/A
-
Clarity and Accuracy All documentation is derived directly from the code.
-
Markdown & MDX Perfection All markdown is properly formatted.
-
Edge Cases To Avoid Breaking MDX No edge cases were broken.
Include in Getting Started: NO