sql3

package
v0.22.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 9, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Is

func Is(err error, target Code) bool

Is is a fork of the Is() method from `pkg/errors` which takes as its target an error Code instead of an error.

func NewErrAggregateNotAllowedInGroupBy

func NewErrAggregateNotAllowedInGroupBy(line, col int, aggName string) error

func NewErrBadColumnConstraint

func NewErrBadColumnConstraint(line, col int, constraint, columnType string) error

func NewErrBoolLiteral

func NewErrBoolLiteral(line, col int) error

func NewErrBooleanExpressionExpected

func NewErrBooleanExpressionExpected(line, col int) error

func NewErrCacheKeyNotFound

func NewErrCacheKeyNotFound(key uint64) error

func NewErrCallParameterCountMismatch

func NewErrCallParameterCountMismatch(line, col int, functionName string, formalCount, actualCount int) error

func NewErrCallParameterValueInvalid

func NewErrCallParameterValueInvalid(line, col int, badParameterValue string, parameterName string) error

func NewErrCallUnknownFunction

func NewErrCallUnknownFunction(line, col int, functionName string) error

func NewErrColumnNotFound

func NewErrColumnNotFound(line, col int, columnName string) error

func NewErrConflictingColumnConstraint

func NewErrConflictingColumnConstraint(line, col int, token1, token2 parser.Token) error

func NewErrDatabaseExists

func NewErrDatabaseExists(line, col int, databaseName string) error

func NewErrDatabaseNotFound

func NewErrDatabaseNotFound(line, col int, databaseName string) error

func NewErrDecimalScaleExpected

func NewErrDecimalScaleExpected(line, col int) error

func NewErrDivideByZero

func NewErrDivideByZero(line, col int) error

func NewErrDuplicateColumn

func NewErrDuplicateColumn(line int, col int, column string) error

func NewErrErrTopLimitCannotCoexist

func NewErrErrTopLimitCannotCoexist(line int, col int) error

func NewErrEvaluatingJSONPathExpr

func NewErrEvaluatingJSONPathExpr(line, col int, exprText string, jsonString string, errorText string) error

func NewErrExpectedColumnReference

func NewErrExpectedColumnReference(line, col int) error

func NewErrExpectedSortExpressionReference

func NewErrExpectedSortExpressionReference(line, col int) error

func NewErrExpectedSortableExpression

func NewErrExpectedSortableExpression(line, col int, typeName string) error

func NewErrExpressionListExpected

func NewErrExpressionListExpected(line, col int) error

func NewErrFormatSpecifierExpected

func NewErrFormatSpecifierExpected(line, col int) error

func NewErrIdColumnNotValidForAggregateFunction

func NewErrIdColumnNotValidForAggregateFunction(line, col int, functionName string) error

func NewErrIncompatibleTypesForRangeSubscripts

func NewErrIncompatibleTypesForRangeSubscripts(line, col int, type1 string, type2 string) error

func NewErrInputSpecifierExpected

func NewErrInputSpecifierExpected(line, col int) error

func NewErrInsertExprTargetCountMismatch

func NewErrInsertExprTargetCountMismatch(line int, col int) error

func NewErrInsertMustAtLeastOneNonIDColumn

func NewErrInsertMustAtLeastOneNonIDColumn(line int, col int) error

func NewErrInsertMustHaveIDColumn

func NewErrInsertMustHaveIDColumn(line int, col int) error

func NewErrInsertValueOutOfRange

func NewErrInsertValueOutOfRange(line, col int, columnName string, rowNumber int, badValue interface{}) error

func NewErrIntExpressionExpected

func NewErrIntExpressionExpected(line, col int) error

func NewErrIntOrDecimalExpressionExpected

func NewErrIntOrDecimalExpressionExpected(line, col int) error

func NewErrIntOrDecimalOrTimestampExpressionExpected

func NewErrIntOrDecimalOrTimestampExpressionExpected(line, col int) error

func NewErrIntOrDecimalOrTimestampOrStringExpressionExpected

func NewErrIntOrDecimalOrTimestampOrStringExpressionExpected(line, col int) error

func NewErrIntegerLiteral

func NewErrIntegerLiteral(line, col int) error

func NewErrInternal

func NewErrInternal(msg string) error

func NewErrInternalf

func NewErrInternalf(format string, a ...interface{}) error

func NewErrInvalidBatchSize

func NewErrInvalidBatchSize(line, col int, batchSize int) error

func NewErrInvalidCast

func NewErrInvalidCast(line, col int, from, to string) error

func NewErrInvalidColumnInFilterExpression

func NewErrInvalidColumnInFilterExpression(line, col int, column string, op string) error

func NewErrInvalidDatabaseOption

func NewErrInvalidDatabaseOption(line, col int, option string) error

func NewErrInvalidDatetimePart

func NewErrInvalidDatetimePart(line, col int, datetimepart int) error

func NewErrInvalidDuration

func NewErrInvalidDuration(line, col int, duration string) error

func NewErrInvalidFormatSpecifier

func NewErrInvalidFormatSpecifier(line, col int, specifier string) error

func NewErrInvalidInputSpecifier

func NewErrInvalidInputSpecifier(line, col int, specifier string) error

func NewErrInvalidKeyPartitionsValue

func NewErrInvalidKeyPartitionsValue(line, col int, keypartitions int64) error

func NewErrInvalidQueryHintParameterCount

func NewErrInvalidQueryHintParameterCount(line, col int, hintName string, desiredList string, desiredCount int, actualCount int) error

func NewErrInvalidTimeEpoch

func NewErrInvalidTimeEpoch(line, col int, epoch string) error

func NewErrInvalidTimeQuantum

func NewErrInvalidTimeQuantum(line, col int, quantum string) error

func NewErrInvalidTimeUnit

func NewErrInvalidTimeUnit(line, col int, unit string) error

func NewErrInvalidTypeCoercion

func NewErrInvalidTypeCoercion(line, col int, from, to string) error

func NewErrInvalidTypeInFilterExpression

func NewErrInvalidTypeInFilterExpression(line, col int, typeName string, op string) error

func NewErrInvalidUngroupedColumnReference

func NewErrInvalidUngroupedColumnReference(line, col int, column string) error

func NewErrInvalidUngroupedColumnReferenceInHaving

func NewErrInvalidUngroupedColumnReferenceInHaving(line, col int, column string) error

func NewErrInvalidUnitsValue

func NewErrInvalidUnitsValue(line, col int, units int64) error

func NewErrLiteralEmptySetNotAllowed

func NewErrLiteralEmptySetNotAllowed(line, col int) error

func NewErrLiteralEmptyTupleNotAllowed

func NewErrLiteralEmptyTupleNotAllowed(line, col int) error

func NewErrLiteralExpected

func NewErrLiteralExpected(line, col int) error

func NewErrLiteralNullNotAllowed

func NewErrLiteralNullNotAllowed(line, col int) error

func NewErrMappingFromDatasource

func NewErrMappingFromDatasource(line, col int, dataSource string, errorText string) error

func NewErrModelExists

func NewErrModelExists(line, col int, viewName string) error

func NewErrModelNotFound

func NewErrModelNotFound(line, col int, viewName string) error

func NewErrOutputValueOutOfRange

func NewErrOutputValueOutOfRange(line, col int) error

func NewErrParameterTypeMistmatch

func NewErrParameterTypeMistmatch(line, col int, type1, type2 string) error

func NewErrParsingJSON

func NewErrParsingJSON(line, col int, jsonString string, errorText string) error

func NewErrQRangeFromAndToTimeCannotBeBothNull

func NewErrQRangeFromAndToTimeCannotBeBothNull(line, col int) error

func NewErrQRangeInvalidUse

func NewErrQRangeInvalidUse(line, col int) error

func NewErrReadingDatasource

func NewErrReadingDatasource(line, col int, dataSource string, errorText string) error

func NewErrRemoteUnauthorized

func NewErrRemoteUnauthorized(line, col int, remoteUrl string) error

func NewErrSetExpressionExpected

func NewErrSetExpressionExpected(line, col int) error

func NewErrSetLiteralMustContainIntOrString

func NewErrSetLiteralMustContainIntOrString(line, col int) error

func NewErrSingleRowExpected

func NewErrSingleRowExpected(line, col int) error

func NewErrStringExpressionExpected

func NewErrStringExpressionExpected(line, col int) error

func NewErrStringLengthMismatch

func NewErrStringLengthMismatch(line, col, len int, val interface{}) error

func NewErrStringLiteral

func NewErrStringLiteral(line, col int) error

func NewErrTableColumnNotFound

func NewErrTableColumnNotFound(line, col int, tableName string, columnName string) error

func NewErrTableExists

func NewErrTableExists(line, col int, tableName string) error

func NewErrTableIDColumnAlter

func NewErrTableIDColumnAlter(line, col int) error

func NewErrTableIDColumnConstraints

func NewErrTableIDColumnConstraints(line, col int) error

func NewErrTableIDColumnType

func NewErrTableIDColumnType(line, col int) error

func NewErrTableMustHaveIDColumn

func NewErrTableMustHaveIDColumn(line, col int) error

func NewErrTableNotFound

func NewErrTableNotFound(line, col int, tableName string) error

func NewErrTableOrViewNotFound

func NewErrTableOrViewNotFound(line, col int, tableName string) error

func NewErrTimeQuantumExpressionExpected

func NewErrTimeQuantumExpressionExpected(line, col int) error

func NewErrTypeAssignmentIncompatible

func NewErrTypeAssignmentIncompatible(line, col int, type1, type2 string) error

func NewErrTypeAssignmentToTimeQuantumIncompatible

func NewErrTypeAssignmentToTimeQuantumIncompatible(line, col int, type1 string) error

func NewErrTypeCannotBeUsedAsRangeSubscript

func NewErrTypeCannotBeUsedAsRangeSubscript(line, col int, type1 string) error

func NewErrTypeConversionOnMap

func NewErrTypeConversionOnMap(line, col int, value interface{}, typeName string) error

func NewErrTypeIncompatibleWithArithmeticOperator

func NewErrTypeIncompatibleWithArithmeticOperator(line, col int, operator, type1 string) error

func NewErrTypeIncompatibleWithBetweenOperator

func NewErrTypeIncompatibleWithBetweenOperator(line, col int, operator, type1 string) error

func NewErrTypeIncompatibleWithBitwiseOperator

func NewErrTypeIncompatibleWithBitwiseOperator(line, col int, operator, type1 string) error

func NewErrTypeIncompatibleWithComparisonOperator

func NewErrTypeIncompatibleWithComparisonOperator(line, col int, operator, type1 string) error

func NewErrTypeIncompatibleWithConcatOperator

func NewErrTypeIncompatibleWithConcatOperator(line, col int, operator, type1 string) error

func NewErrTypeIncompatibleWithEqualityOperator

func NewErrTypeIncompatibleWithEqualityOperator(line, col int, operator, type1 string) error

func NewErrTypeIncompatibleWithLikeOperator

func NewErrTypeIncompatibleWithLikeOperator(line, col int, operator, type1 string) error

func NewErrTypeIncompatibleWithLogicalOperator

func NewErrTypeIncompatibleWithLogicalOperator(line, col int, operator, type1 string) error

func NewErrTypeMismatch

func NewErrTypeMismatch(line, col int, type1, type2 string) error

func NewErrTypesAreNotEquatable

func NewErrTypesAreNotEquatable(line, col int, type1, type2 string) error

func NewErrUnexpectedTimeQuantumTupleLength

func NewErrUnexpectedTimeQuantumTupleLength(line, col int, columnName string, rowNumber int, badValue []interface{}, length int) error

func NewErrUnexpectedTypeConversion

func NewErrUnexpectedTypeConversion(line, col int, val interface{}) error

func NewErrUnknownIdentifier

func NewErrUnknownIdentifier(line int, col int, ident string) error

func NewErrUnknownQueryHint

func NewErrUnknownQueryHint(line, col int, hintName string) error

func NewErrUnknownShowOption

func NewErrUnknownShowOption(line, col int, optionName string) error

func NewErrUnknownType

func NewErrUnknownType(line int, col int, typ string) error

func NewErrUnsupported

func NewErrUnsupported(line, col int, is bool, thing string) error

func NewErrValueOutOfRange

func NewErrValueOutOfRange(line, col int, val interface{}) error

function evaluation

func NewErrViewExists

func NewErrViewExists(line, col int, viewName string) error

func NewErrViewNotFound

func NewErrViewNotFound(line, col int, viewName string) error

Types

type Code

type Code string
const (
	ErrInternal         Code = "ErrInternal"
	ErrUnsupported      Code = "ErrUnsupported"
	ErrCacheKeyNotFound Code = "ErrCacheKeyNotFound"

	// syntax/semantic errors
	ErrDuplicateColumn       Code = "ErrDuplicateColumn"
	ErrUnknownType           Code = "ErrUnknownType"
	ErrUnknownIdentifier     Code = "ErrUnknownIdentifier"
	ErrTopLimitCannotCoexist Code = "ErrTopLimitCannotCoexist"

	// type related errors
	ErrTypeIncompatibleWithBitwiseOperator               Code = "ErrTypeIncompatibleWithBitwiseOperator"
	ErrTypeIncompatibleWithLogicalOperator               Code = "ErrTypeIncompatibleWithLogicalOperator"
	ErrTypeIncompatibleWithEqualityOperator              Code = "ErrTypeIncompatibleWithEqualityOperator"
	ErrTypeIncompatibleWithComparisonOperator            Code = "ErrTypeIncompatibleWithComparisonOperator"
	ErrTypeIncompatibleWithArithmeticOperator            Code = "ErrTypeIncompatibleWithArithmeticOperator"
	ErrTypeIncompatibleWithConcatOperator                Code = "ErrTypeIncompatibleWithConcatOperator"
	ErrTypeIncompatibleWithLikeOperator                  Code = "ErrTypeIncompatibleWithLikeOperator"
	ErrTypeIncompatibleWithBetweenOperator               Code = "ErrTypeIncompatibleWithBetweenOperator"
	ErrTypeCannotBeUsedAsRangeSubscript                  Code = "ErrTypeCannotBeUsedAsRangeSubscript"
	ErrTypesAreNotEquatable                              Code = "ErrTypesAreNotEquatable"
	ErrTypeMismatch                                      Code = "ErrTypeMismatch"
	ErrIncompatibleTypesForRangeSubscripts               Code = "ErrIncompatibleTypesForRangeSubscripts"
	ErrExpressionListExpected                            Code = "ErrExpressionListExpected"
	ErrBooleanExpressionExpected                         Code = "ErrBooleanExpressionExpected"
	ErrIntExpressionExpected                             Code = "ErrIntExpressionExpected"
	ErrIntOrDecimalExpressionExpected                    Code = "ErrIntOrDecimalExpressionExpected"
	ErrIntOrDecimalOrTimestampExpressionExpected         Code = "ErrIntOrDecimalOrTimestampExpressionExpected"
	ErrIntOrDecimalOrTimestampOrStringExpressionExpected Code = "ErrIntOrDecimalOrTimestampOrStringExpressionExpected"
	ErrStringExpressionExpected                          Code = "ErrStringExpressionExpected"
	ErrSetExpressionExpected                             Code = "ErrSetExpressionExpected"
	ErrTimeQuantumExpressionExpected                     Code = "ErrTimeQuantumExpressionExpected"
	ErrSingleRowExpected                                 Code = "ErrSingleRowExpected"

	// decimal
	ErrDecimalScaleExpected Code = "ErrDecimalScaleExpected"

	ErrInvalidCast         Code = "ErrInvalidCast"
	ErrInvalidTypeCoercion Code = "ErrInvalidTypeCoercion"

	ErrLiteralExpected                  Code = "ErrLiteralExpected"
	ErrIntegerLiteral                   Code = "ErrIntegerLiteral"
	ErrStringLiteral                    Code = "ErrStringLiteral"
	ErrBoolLiteral                      Code = "ErrBoolLiteral"
	ErrLiteralNullNotAllowed            Code = "ErrLiteralNullNotAllowed"
	ErrLiteralEmptySetNotAllowed        Code = "ErrLiteralEmptySetNotAllowed"
	ErrLiteralEmptyTupleNotAllowed      Code = "ErrLiteralEmptyTupleNotAllowed"
	ErrSetLiteralMustContainIntOrString Code = "ErrSetLiteralMustContainIntOrString"
	ErrInvalidColumnInFilterExpression  Code = "ErrInvalidColumnInFilterExpression"
	ErrInvalidTypeInFilterExpression    Code = "ErrInvalidTypeInFilterExpression"

	ErrTypeAssignmentIncompatible              Code = "ErrTypeAssignmentIncompatible"
	ErrTypeAssignmentToTimeQuantumIncompatible Code = "ErrTypeAssignmentToTimeQuantumIncompatible"

	ErrInvalidUngroupedColumnReference         Code = "ErrInvalidUngroupedColumnReference"
	ErrInvalidUngroupedColumnReferenceInHaving Code = "ErrInvalidUngroupedColumnReferenceInHaving"

	ErrInvalidTimeUnit    Code = "ErrInvalidTimeUnit"
	ErrInvalidTimeEpoch   Code = "ErrInvalidTimeEpoch"
	ErrInvalidTimeQuantum Code = "ErrInvalidTimeQuantum"
	ErrInvalidDuration    Code = "ErrInvalidDuration"

	ErrInsertExprTargetCountMismatch   Code = "ErrInsertExprTargetCountMismatch"
	ErrInsertMustHaveIDColumn          Code = "ErrInsertMustHaveIDColumn"
	ErrInsertMustAtLeastOneNonIDColumn Code = "ErrInsertMustAtLeastOneNonIDColumn"

	ErrDatabaseNotFound      Code = "ErrDatabaseNotFound"
	ErrDatabaseExists        Code = "ErrDatabaseExists"
	ErrInvalidDatabaseOption Code = "ErrInvalidDatabaseOption"
	ErrInvalidUnitsValue     Code = "ErrInvalidUnitsValue"

	ErrTableMustHaveIDColumn     Code = "ErrTableMustHaveIDColumn"
	ErrTableIDColumnType         Code = "ErrTableIDColumnType"
	ErrTableIDColumnConstraints  Code = "ErrTableIDColumnConstraints"
	ErrTableIDColumnAlter        Code = "ErrTableIDColumnAlter"
	ErrTableNotFound             Code = "ErrTableNotFound"
	ErrTableExists               Code = "ErrTableExists"
	ErrColumnNotFound            Code = "ErrColumnNotFound"
	ErrTableColumnNotFound       Code = "ErrTableColumnNotFound"
	ErrInvalidKeyPartitionsValue Code = "ErrInvalidKeyPartitionsValue"

	ErrTableOrViewNotFound Code = "ErrTableOrViewNotFound"

	ErrViewExists   Code = "ErrViewExists"
	ErrViewNotFound Code = "ErrViewNotFound"

	ErrModelExists   Code = "ErrModelExists"
	ErrModelNotFound Code = "ErrModelNotFound"

	ErrBadColumnConstraint         Code = "ErrBadColumnConstraint"
	ErrConflictingColumnConstraint Code = "ErrConflictingColumnConstraint"

	// expected errors
	ErrExpectedColumnReference         Code = "ErrExpectedColumnReference"
	ErrExpectedSortExpressionReference Code = "ErrExpectedSortExpressionReference"
	ErrExpectedSortableExpression      Code = "ErrExpectedSortableExpression"

	// call errors
	ErrCallUnknownFunction                  Code = "ErrCallUnknownFunction"
	ErrCallParameterCountMismatch           Code = "ErrCallParameterCountMismatch"
	ErrIdColumnNotValidForAggregateFunction Code = "ErrIdColumnNotValidForAggregateFunction"
	ErrParameterTypeMistmatch               Code = "ErrParameterTypeMistmatch"
	ErrCallParameterValueInvalid            Code = "ErrCallParameterValueInvalid"

	ErrInsertValueOutOfRange            Code = "ErrInsertValueOutOfRange"
	ErrUnexpectedTimeQuantumTupleLength Code = "ErrUnexpectedTimeQuantumTupleLength"

	ErrReadingDatasource       Code = "ErrReadingDatasource"
	ErrMappingFromDatasource   Code = "ErrMappingFromDatasource"
	ErrFormatSpecifierExpected Code = "ErrFormatSpecifierExpected"
	ErrInvalidFormatSpecifier  Code = "ErrInvalidFormatSpecifier"
	ErrInputSpecifierExpected  Code = "ErrInputSpecifierExpected"
	ErrInvalidInputSpecifier   Code = "ErrInvalidInputSpecifier"
	ErrInvalidBatchSize        Code = "ErrInvalidBatchSize"
	ErrTypeConversionOnMap     Code = "ErrTypeConversionOnMap"
	ErrParsingJSON             Code = "ErrParsingJSON"
	ErrEvaluatingJSONPathExpr  Code = "ErrEvaluatingJSONPathExpr"

	// optimizer errors
	ErrAggregateNotAllowedInGroupBy Code = "ErrIdPercentileNotAllowedInGroupBy"

	// function evaluation
	ErrValueOutOfRange          Code = "ErrValueOutOfRange"
	ErrStringLengthMismatch     Code = "ErrStringLengthMismatch"
	ErrUnexpectedTypeConversion Code = "ErrUnexpectedTypeConversion"

	// time quantum function eval
	ErrQRangeFromAndToTimeCannotBeBothNull Code = "ErrQRangeFromAndToTimeCannotBeBothNull"
	ErrQRangeInvalidUse                    Code = "ErrQRangeInvalidUse"
	ErrInvalidDatetimePart                 Code = "ErrInvalidDatetimePart"
	ErrOutputValueOutOfRange               Code = "ErrOutputValueOutOfRange"
	ErrDivideByZero                        Code = "ErrDivideByZero"

	// remote execution
	ErrRemoteUnauthorized Code = "ErrRemoteUnauthorized"

	// query hints
	ErrUnknownQueryHint               Code = "ErrInvalidQueryHint"
	ErrInvalidQueryHintParameterCount Code = "ErrInvalidQueryHintParameterCount"

	// show options
	ErrUnknownShowOption Code = "ErrUnknownShowOption"
)
const (
	ErrOrganizationIDDoesNotExist Code = "OrganizationIDDoesNotExist"

	ErrDatabaseIDExists         Code = "DatabaseIDExists"
	ErrDatabaseIDDoesNotExist   Code = "DatabaseIDDoesNotExist"
	ErrDatabaseNameDoesNotExist Code = "DatabaseNameDoesNotExist"
	ErrDatabaseNameExists       Code = "DatabaseNameExists"

	ErrTableIDExists         Code = "TableIDExists"
	ErrTableKeyExists        Code = "TableKeyExists"
	ErrTableNameExists       Code = "TableNameExists"
	ErrTableIDDoesNotExist   Code = "TableIDDoesNotExist"
	ErrTableKeyDoesNotExist  Code = "TableKeyDoesNotExist"
	ErrTableNameDoesNotExist Code = "TableNameDoesNotExist"

	ErrFieldExists       Code = "FieldExists"
	ErrFieldDoesNotExist Code = "FieldDoesNotExist"

	ErrInvalidTransaction Code = "InvalidTransaction"

	ErrUnimplemented Code = "Unimplemented"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL