-
Sample SQL: Desired map type: Reason: Caching a table's PKs in memory using a From what I can see, Alternative is to use Could |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
What you are really looking for is a version of |
Beta Was this translation helpful? Give feedback.
RowToMap
is designed to represent each row as a key-value pair. It's not what you are looking for.What you are really looking for is a version of
CollectRows
that collects into a map instead of a slice. The code forCollectRows
is pretty simple, you can either copy and change that or userows.Next()
androws.Scan()
directly.