Documentation
¶
Index ¶
- type Map
- func Collect[K cmp.Ordered, V any](seq func(yield func(K, V) bool)) *Map[K, V]
- func CollectFunc[K comparable, V any](seq func(yield func(K, V) bool), compare func(K, K) int) *Map[K, V]
- func CollectN[K cmp.Ordered, V any](seq func(yield func(K, V) bool), n int) *Map[K, V]
- func CollectNFunc[K comparable, V any](seq func(yield func(K, V) bool), n int, compare func(K, K) int) *Map[K, V]
- func FromMap[M ~map[K]V, K cmp.Ordered, V any](m M) *Map[K, V]
- func FromMapFunc[M ~map[K]V, K comparable, V any](m M, compare func(K, K) int) *Map[K, V]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Map ¶
type Map[K comparable, V any] []entry[K, V]
Map is a simple implementation of column.IterableOrderedMap interface. It is intended to be used as a serdes wrapper for map[K]V and not as a general purpose container.
func CollectFunc ¶
func CollectFunc[K comparable, V any](seq func(yield func(K, V) bool), compare func(K, K) int) *Map[K, V]
CollectFunc creates a Map from an iter.Seq2[K,V] iterator with a custom compare function.
func CollectNFunc ¶
func CollectNFunc[K comparable, V any](seq func(yield func(K, V) bool), n int, compare func(K, K) int) *Map[K, V]
CollectNFunc creates a Map, pre-sized for n entries, from an iter.Seq2[K,V] iterator with a custom compare function.
func FromMapFunc ¶
func FromMapFunc[M ~map[K]V, K comparable, V any](m M, compare func(K, K) int) *Map[K, V]
func (*Map[K, V]) Iterator ¶
func (om *Map[K, V]) Iterator() column.MapIterator
Iterator is part of column.IterableOrderedMap interface, it expects to be called by the driver itself.
Click to show internal directories.
Click to hide internal directories.