objecttool

package
v0.0.0-debug-20260702 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2026 License: Apache-2.0 Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FormatterByName = map[string]Formatter{
	"default":     &DefaultFormatter{},
	"objectstats": &ObjectStatsFormatter{},
	"rowid":       &RowidFormatter{},
	"ts":          &TSFormatter{},
	"hex":         &HexFormatter{},
}

FormatterByName maps formatter names to formatters

Functions

This section is empty.

Types

type ColInfo

type ColInfo struct {
	Idx  uint16
	Type types.Type
}

ColInfo contains column information

type DefaultFormatter

type DefaultFormatter struct{}

DefaultFormatter is the default formatter

func (*DefaultFormatter) CanFormat

func (f *DefaultFormatter) CanFormat(value any, typ types.Type) bool

func (*DefaultFormatter) Format

func (f *DefaultFormatter) Format(value any) string

type Formatter

type Formatter interface {
	Format(value any) string
	CanFormat(value any, typ types.Type) bool
}

Formatter is the column formatter interface

type FormatterRegistry

type FormatterRegistry struct {
	// contains filtered or unexported fields
}

FormatterRegistry is the formatter registry

func NewFormatterRegistry

func NewFormatterRegistry() *FormatterRegistry

func (*FormatterRegistry) ClearFormatter

func (r *FormatterRegistry) ClearFormatter(colIdx uint16)

ClearFormatter clears formatter for specified column

func (*FormatterRegistry) GetFormatter

func (r *FormatterRegistry) GetFormatter(colIdx uint16, typ types.Type, sample any) Formatter

GetFormatter gets the formatter for a column

func (*FormatterRegistry) GetFormatterName

func (r *FormatterRegistry) GetFormatterName(colIdx uint16) string

GetFormatterName gets formatter name (for display)

func (*FormatterRegistry) SetFormatter

func (r *FormatterRegistry) SetFormatter(colIdx uint16, f Formatter)

SetFormatter sets formatter for specified column

type HexFormatter

type HexFormatter struct{}

HexFormatter formats as hexadecimal

func (*HexFormatter) CanFormat

func (f *HexFormatter) CanFormat(value any, typ types.Type) bool

func (*HexFormatter) Format

func (f *HexFormatter) Format(value any) string

type ObjectInfo

type ObjectInfo struct {
	Path       string
	ObjectName objectio.ObjectName

	BlockCount uint32
	RowCount   uint64
	ColCount   uint16

	Size     uint32
	OrigSize uint32

	IsSorted     bool
	IsAppendable bool
	IsCNCreated  bool
}

ObjectInfo contains object metadata

type ObjectReader

type ObjectReader struct {
	// contains filtered or unexported fields
}

ObjectReader reads object files

func Open

func Open(ctx context.Context, path string) (*ObjectReader, error)

Open opens an object file

func (*ObjectReader) BlockCount

func (r *ObjectReader) BlockCount() uint32

BlockCount returns block count

func (*ObjectReader) Close

func (r *ObjectReader) Close() error

Close closes the reader

func (*ObjectReader) Columns

func (r *ObjectReader) Columns() []ColInfo

Columns returns column information

func (*ObjectReader) Info

func (r *ObjectReader) Info() *ObjectInfo

Info returns object information

func (*ObjectReader) Meta

Meta returns the object data meta

func (*ObjectReader) ReadBlock

func (r *ObjectReader) ReadBlock(ctx context.Context, blockIdx uint32) (*batch.Batch, func(), error)

ReadBlock reads data from specified block

type ObjectStatsFormatter

type ObjectStatsFormatter struct{}

ObjectStatsFormatter formats ObjectStats

func (*ObjectStatsFormatter) CanFormat

func (f *ObjectStatsFormatter) CanFormat(value any, typ types.Type) bool

func (*ObjectStatsFormatter) Format

func (f *ObjectStatsFormatter) Format(value any) string

type RowidFormatter

type RowidFormatter struct{}

RowidFormatter formats Rowid

func (*RowidFormatter) CanFormat

func (f *RowidFormatter) CanFormat(value any, typ types.Type) bool

func (*RowidFormatter) Format

func (f *RowidFormatter) Format(value any) string

type TSFormatter

type TSFormatter struct{}

TSFormatter formats TS

func (*TSFormatter) CanFormat

func (f *TSFormatter) CanFormat(value any, typ types.Type) bool

func (*TSFormatter) Format

func (f *TSFormatter) Format(value any) string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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