Documentation
¶
Index ¶
- func ExecWhenSettable[T any](input *T, structTag string, f func(string, reflect.Value) error) error
- func GetValue(val reflect.Value) (any, error)
- func InsertStruct[T any](input *T, structTag string) func(r column.Row) error
- func LoadBasicSnapshot(col *column.Collection, r io.Reader) error
- func LoadBasicSnapshotFile(col *column.Collection, filepath string) error
- func LoadDeepSnapshot(r io.Reader) (*column.Collection, map[string]any, error)
- func LoadDeepSnapshotFile(filepath string) (*column.Collection, map[string]any, error)
- func SaveBasicSnapshot(col *column.Collection, w io.Writer) error
- func SaveBasicSnapshotFile(col *column.Collection, filepath string) error
- func SaveDeepSnapshot(col *column.Collection, csvCols map[string]any, w io.Writer) error
- func SaveDeepSnapshotFile(col *column.Collection, csvCols map[string]any, filepath string) error
- func SetValue(r column.Row, val reflect.Value, colName string) error
- func StructToCols[T any](col *column.Collection, structTag string) (map[string]any, error)
- func StructToColsDirect[T any](col *column.Collection, structTag string) error
- func StructToColsMap[T any](structTag string) (map[string]any, error)
- type DeepSnapshot
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecWhenSettable ¶
ExecWhenSettable executes a function on a reflect.Value when it's settable
func InsertStruct ¶
InsertStruct converts a given struct to a row Fields must be tagged with `col`
func LoadBasicSnapshot ¶
func LoadBasicSnapshot(col *column.Collection, r io.Reader) error
LoadBasicSnapshot takes a collection and loads a basic snapshot (only data, no columns) Reads from given reader using s2 decompression
func LoadBasicSnapshotFile ¶
func LoadBasicSnapshotFile(col *column.Collection, filepath string) error
LoadBasicSnapshotFile takes a collection and loads a basic snapshot (only data, no columns) Loads it from the given filepath using s2 decompression
func LoadDeepSnapshot ¶
LoadDeepSnapshot takes a collection and loads a deep snapshot (data + columns) Reads from given reader using gob decoding + s2 decompression
func LoadDeepSnapshotFile ¶
LoadDeepSnapshotFile takes a collection and loads a deep snapshot (data + columns) Loads it from the given filepath using gob decoding + s2 decompression
func SaveBasicSnapshot ¶
func SaveBasicSnapshot(col *column.Collection, w io.Writer) error
SaveBasicSnapshot takes a collection and creates a basic snapshot (only data, no columns) Writes to given writer using s2 compression
func SaveBasicSnapshotFile ¶
func SaveBasicSnapshotFile(col *column.Collection, filepath string) error
SaveBasicSnapshotFile takes a collection and creates a basic snapshot (only data, no columns) Saves it to filepath using s2 compression
func SaveDeepSnapshot ¶
SaveDeepSnapshot takes a collection and creates a deep snapshot (data + columns) Writes to given writer using gob encoding + s2 compression
func SaveDeepSnapshotFile ¶
SaveDeepSnapshotFile takes a collection and creates a deep snapshot (data + columns) Saves it to filepath using gob encoding + s2 compression
func StructToCols ¶
StructToCols converts a given struct to columns Fields must be tagged with given structTag
func StructToColsDirect ¶
func StructToColsDirect[T any](col *column.Collection, structTag string) error
StructToColsDirect converts a given struct to columns Fields must be tagged with given structTag
Types ¶
type DeepSnapshot ¶
DeepSnapshot struct to hold csv column data and collection data
func (DeepSnapshot) ToCollection ¶
func (d DeepSnapshot) ToCollection() (*column.Collection, map[string]any, error)
ToCollection converts the deep snapshot back into a collection + columns