package records

Import Path
	github.com/polarsignals/frostdb/internal/records (on go.dev)

Dependency Relation
	imports 12 packages, and imported by 2 packages

Involved Source Files record_builder.go record_reader.go
Package-Level Type Names (total 3)
/* sort by: | */
Type Parameters: T: any Build is a generic arrow.Record builder that ingests structs of type T. The generated record can be passed to (*Table).InsertRecord. Struct tag `frostdb` is used to pass options for the schema for T and use (*Build[T]).Schema to obtain schema v1alpha1. This api is opinionated. - Nested Columns are not supported # Tags Use `frostdb` to define tags that customizes field values. You can express everything needed to construct schema v1alpha1. Tags are defined as a comma separated list. The first item is the column name. Column name is optional, when omitted it is derived from the field name (snake_cased) Supported Tags delta_binary_packed | Delta binary packed encoding. brotli | Brotli compression. asc | Sorts in ascending order.Use asc(n) where n is an integer for sorting order. gzip | GZIP compression. snappy | Snappy compression. delta_length_byte_array | Delta Length Byte Array encoding. delta_byte_array | Delta Byte Array encoding. desc | Sorts in descending order.Use desc(n) where n is an integer for sorting order lz4_raw | LZ4_RAW compression. pre_hash | Prehash the column before storing it. null_first | When used wit asc nulls are smallest and with des nulls are largest. zstd | ZSTD compression. rle_dict | Dictionary run-length encoding. plain | Plain encoding. Example tagged Sample struct type Sample struct { ExampleType string `frostdb:"example_type,rle_dict,asc(0)"` Labels []Label `frostdb:"labels,rle_dict,null,dyn,asc(1),null_first"` Stacktrace []uuid.UUID `frostdb:"stacktrace,rle_dict,asc(3),null_first"` Timestamp int64 `frostdb:"timestamp,asc(2)"` Value int64 `frostdb:"value"` } # Dynamic columns Field of type map<string, T> is a dynamic column by default. type Example struct { // Use supported tags to customize the column value Labels map[string]string `frostdb:"labels"` } # Repeated columns Fields of type []int64, []float64, []bool, and []string are supported. These are represented as arrow.LIST. Generated schema for the repeated columns applies all supported tags. By default repeated fields are nullable. You can safely pass nil slices for repeated columns. (*Build[T]) Append(values ...T) error (*Build[T]) NewRecord() *Record (*Build[T]) Release() ( Build[T]) Schema(name string) (s *schemapb.Schema) func NewBuild[T](mem memory.Allocator) *Build[T]
Type Parameters: T: any (*Reader[T]) NumRows() int64 (*Reader[T]) Value(i int) T func NewReader[T](records ...arrow.Record) *Reader[T]
Record arrow.Record SortingColumns []arrowutils.SortingColumn ( Record) Column(i int) arrow.Array ( Record) ColumnName(i int) string ( Record) Columns() []arrow.Array ( Record) MarshalJSON() ([]byte, error) NewSlice constructs a zero-copy slice of the record with the indicated indices i and j, corresponding to array[i:j]. The returned record must be Release()'d after use. NewSlice panics if the slice is outside the valid range of the record array. NewSlice panics if j < i. ( Record) NumCols() int64 ( Record) NumRows() int64 ( Record) Release() ( Record) Retain() ( Record) Schema() *arrow.Schema ( Record) SetColumn(i int, col arrow.Array) (arrow.RecordBatch, error) Record : github.com/apache/arrow-go/v18/arrow.RecordBatch Record : github.com/apache/arrow-go/v18/arrow/scalar.Releasable Record : github.com/goccy/go-json.Marshaler Record : encoding/json.Marshaler func (*Build)[T].NewRecord() *Record
Package-Level Functions (total 4)
Type Parameters: T: any
Type Parameters: T: any
Package-Level Constants (only one)
const TagName = "frostdb"