group

package
v0.27.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package group can group the entries of an array by one or more columns. This will reduce the number of entries to the number of distinct values for the columns you group by. By default, the values of the first entry belonging to a group will be used, however, you can specify the `group` attribute to add up the values of a given field.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GroupEntries

func GroupEntries[T any](cols columns.ColumnMap[T], entries []*T, groupBy []string) ([]*T, error)

GroupEntries will group the given entries using the column names given in groupBy and return a new array with the results; if groupBy contains an empty string, all given entries will be grouped

Types

This section is empty.

Jump to

Keyboard shortcuts

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