Documentation ¶
Index ¶
- Variables
- func APIErrorToLogFields(apiErr *api_service_protos.TError) []zap.Field
- func AllStreamResponsesSuccessfull[T StreamResponse](responses []T) bool
- func AnnotateLoggerForUnaryCall(l *zap.Logger, method string, dsi *api_common.TDataSourceInstance) *zap.Logger
- func AnnotateLoggerWithDataSourceInstance(l *zap.Logger, dsi *api_common.TDataSourceInstance) *zap.Logger
- func AnnotateLoggerWithMethod(l *zap.Logger, method string) *zap.Logger
- func EndpointToString(ep *api_common.TEndpoint) string
- func IsSuccess(apiErr *api_service_protos.TError) bool
- func ListSplitsResponsesToSplits(in []*api_service_protos.TListSplitsResponse) []*api_service_protos.TSplit
- func LogCloserError(logger *zap.Logger, closer io.Closer, msg string)
- func MakeOptionalType(ydbType *Ydb.Type) *Ydb.Type
- func MakePrimitiveType(typeId Ydb.Type_PrimitiveTypeId) *Ydb.Type
- func MakeTypedValue(ydbType *Ydb.Type, value any) *Ydb.TypedValue
- func MustTimeToYDBType[OUT ydbTime](f func(t *time.Time) (OUT, error), t time.Time) OUT
- func NewAPIErrorFromStdError(err error) *api_service_protos.TError
- func NewDefaultLogger() *zap.Logger
- func NewLoggerFromConfig(cfg *config.TLoggerConfig) (*zap.Logger, error)
- func NewSTDErrorFromAPIError(apiErr *api_service_protos.TError) error
- func NewSuccess() *api_service_protos.TError
- func NewTestLogger(t *testing.T) *zap.Logger
- func ReadResponsesToArrowRecords(responses []*api_service_protos.TReadSplitsResponse) ([]arrow.Record, error)
- func SchemaToSelectWhatItems(schema *api_service_protos.TSchema, whitelist map[string]struct{}) *api_service_protos.TSelect_TWhat
- func SelectToFields(slct *api_service_protos.TSelect) []zap.Field
- func SelectWhatToArrowSchema(selectWhat *api_service_protos.TSelect_TWhat) (*arrow.Schema, error)
- func SelectWhatToYDBTypes(selectWhat *api_service_protos.TSelect_TWhat) ([]*Ydb.Type, error)
- func TimeToYDBDate(t *time.Time) (uint16, error)
- func TimeToYDBDatetime(t *time.Time) (uint32, error)
- func TimeToYDBTimestamp(t *time.Time) (uint64, error)
- func YdbTypeToYdbPrimitiveTypeID(ydbType *Ydb.Type) (Ydb.Type_PrimitiveTypeId, error)
- func YdbTypesToArrowBuilders(ydbTypes []*Ydb.Type, arrowAllocator memory.Allocator) ([]array.Builder, error)
- type ArrowArrayType
- type ArrowBuilder
- type QueryLogger
- type QueryLoggerFactory
- type StreamResponse
- type ValueType
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrTableDoesNotExist = fmt.Errorf("table does not exist") ErrDataSourceNotSupported = fmt.Errorf("data source not supported") ErrDataTypeNotSupported = fmt.Errorf("data type not supported") ErrMethodNotSupported = fmt.Errorf("method not supported") ErrReadLimitExceeded = fmt.Errorf("read limit exceeded") ErrInvalidRequest = fmt.Errorf("invalid request") ErrValueOutOfTypeBounds = fmt.Errorf("value is out of possible range of values for the type") ErrUnimplemented = fmt.Errorf("unimplemented") ErrUnimplementedTypedValue = fmt.Errorf("unimplemented typed value") ErrUnimplementedExpression = fmt.Errorf("unimplemented expression") ErrUnsupportedExpression = fmt.Errorf("expression is not supported") ErrUnimplementedOperation = fmt.Errorf("unimplemented operation") ErrUnimplementedPredicateType = fmt.Errorf("unimplemented predicate type") ErrInvariantViolation = fmt.Errorf("implementation error (invariant violation)") ErrUnimplementedArithmeticalExpression = fmt.Errorf("unimplemented arithmetical expression") ErrEmptyTableName = fmt.Errorf("empty table name") ErrPageSizeExceeded = fmt.Errorf("page size exceeded, check service configuration") )
Functions ¶
func APIErrorToLogFields ¶
func APIErrorToLogFields(apiErr *api_service_protos.TError) []zap.Field
func AllStreamResponsesSuccessfull ¶
func AllStreamResponsesSuccessfull[T StreamResponse](responses []T) bool
func AnnotateLoggerForUnaryCall ¶
func AnnotateLoggerForUnaryCall(l *zap.Logger, method string, dsi *api_common.TDataSourceInstance) *zap.Logger
func AnnotateLoggerWithDataSourceInstance ¶
func AnnotateLoggerWithDataSourceInstance(l *zap.Logger, dsi *api_common.TDataSourceInstance) *zap.Logger
func EndpointToString ¶
func EndpointToString(ep *api_common.TEndpoint) string
func IsSuccess ¶
func IsSuccess(apiErr *api_service_protos.TError) bool
func ListSplitsResponsesToSplits ¶
func ListSplitsResponsesToSplits(in []*api_service_protos.TListSplitsResponse) []*api_service_protos.TSplit
func MakePrimitiveType ¶
func MakePrimitiveType(typeId Ydb.Type_PrimitiveTypeId) *Ydb.Type
func MakeTypedValue ¶
func MakeTypedValue(ydbType *Ydb.Type, value any) *Ydb.TypedValue
func MustTimeToYDBType ¶
func NewAPIErrorFromStdError ¶
func NewAPIErrorFromStdError(err error) *api_service_protos.TError
func NewDefaultLogger ¶
func NewLoggerFromConfig ¶
func NewLoggerFromConfig(cfg *config.TLoggerConfig) (*zap.Logger, error)
func NewSTDErrorFromAPIError ¶
func NewSTDErrorFromAPIError(apiErr *api_service_protos.TError) error
func NewSuccess ¶
func NewSuccess() *api_service_protos.TError
func ReadResponsesToArrowRecords ¶
func ReadResponsesToArrowRecords(responses []*api_service_protos.TReadSplitsResponse) ([]arrow.Record, error)
func SchemaToSelectWhatItems ¶
func SchemaToSelectWhatItems( schema *api_service_protos.TSchema, whitelist map[string]struct{}, ) *api_service_protos.TSelect_TWhat
func SelectToFields ¶
func SelectToFields(slct *api_service_protos.TSelect) []zap.Field
func SelectWhatToArrowSchema ¶
func SelectWhatToArrowSchema(selectWhat *api_service_protos.TSelect_TWhat) (*arrow.Schema, error)
func SelectWhatToYDBTypes ¶
func SelectWhatToYDBTypes(selectWhat *api_service_protos.TSelect_TWhat) ([]*Ydb.Type, error)
func YdbTypeToYdbPrimitiveTypeID ¶
func YdbTypeToYdbPrimitiveTypeID(ydbType *Ydb.Type) (Ydb.Type_PrimitiveTypeId, error)
Types ¶
type ArrowArrayType ¶
type ArrowBuilder ¶
type ArrowBuilder[VT ValueType] interface { AppendNull() Append(value VT) }
type QueryLogger ¶
func (*QueryLogger) Dump ¶
func (ql *QueryLogger) Dump(query string, args ...any)
type QueryLoggerFactory ¶
type QueryLoggerFactory struct {
// contains filtered or unexported fields
}
func NewQueryLoggerFactory ¶
func NewQueryLoggerFactory(cfg *config.TLoggerConfig) QueryLoggerFactory
func (*QueryLoggerFactory) Make ¶
func (f *QueryLoggerFactory) Make(logger *zap.Logger) QueryLogger
type StreamResponse ¶
type StreamResponse interface { *api_service_protos.TListSplitsResponse | *api_service_protos.TReadSplitsResponse GetError() *api_service_protos.TError }
Click to show internal directories.
Click to hide internal directories.