diff options
| author | Stefan Majewsky <majewsky@gmx.net> | 2026-08-03 17:04:16 +0200 |
|---|---|---|
| committer | Stefan Majewsky <majewsky@gmx.net> | 2026-08-03 17:04:16 +0200 |
| commit | b6b1f2ab4e28d3e964fb9c429d424e5509e6b3ab (patch) | |
| tree | 897965fe6a157ad30906b0b665315b4151f073d7 | |
| parent | 431cfa19cc8bd45880bceb99f779c85a65708b8b (diff) | |
| download | go-oblast-b6b1f2ab4e28d3e964fb9c429d424e5509e6b3ab.tar.gz | |
| -rw-r--r-- | runtimeindex.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/runtimeindex.go b/runtimeindex.go index 394c6a8..8167ba6 100644 --- a/runtimeindex.go +++ b/runtimeindex.go @@ -7,6 +7,9 @@ package oblast // It is most commonly used with the result of [Store.Select] or [Store.SelectWhere], to build a lookup table for or partition of the retrieved records. type RuntimeIndex[R any, K comparable] func(R) K +// TODO: rename Index() to Of(), IndexFrom() to From(), Partition() to PartitionOf() (in practice, instances of RuntimeIndex are often named e.g. ObjectByIDIndex, and then ObjectByIDIndex.IndexFrom() stutters) -> naming might need some workshopping +// TODO: make Index() and Partition() take an iter.Seq[], or alternatively add additional methods that do + // NewRuntimeIndex casts a function into type [RuntimeIndex]. // // In practice, this is more compact than writing the cast directly |
