Results for “keys”
Small, practical examples. Search by task or narrow things down below.
Sort map keys for stable output
Sort map keys for stable output using a complete Go program with explicit sample inputs.
Go✓ Tested
Use case-insensitive dictionary keys
C#: Choose an ordinal comparer when case-insensitive keys represent identifiers.
C#✓ Tested
Visit associative-array keys in a stable order
Bash Scripts: Associative arrays have no defined iteration order, so sort their keys explicitly.
Bash Scripts✓ Tested
Read a page after a known unique key
SQL: A keyset predicate avoids scanning and discarding an increasing offset on a suitable index.
SQL✓ Tested
Read a page after a known unique key
SQL Server: A keyset predicate avoids scanning and discarding an increasing offset on a suitable index.
SQL Server✓ Tested
Read a page after a known unique key
Postgres: A keyset predicate avoids scanning and discarding an increasing offset on a suitable index.
Postgres✓ Tested
Read a page after a known unique key
SQLite: A keyset predicate avoids scanning and discarding an increasing offset on a suitable index.
SQLite✓ Tested
Type a dictionary with Record
Limit a lookup table to a known set of keys.
Record✓ Tested
Expand a JSON array into rows
Iterate array elements using a table-valued function.
json_each✓ Tested
Group strings by their length
Java: Choose a TreeMap supplier when group keys must have deterministic order.
Java✓ Tested
Index records by a unique key
Java: Use toMap with an explicit merge rule so duplicate keys have defined behavior.
Java✓ Tested
Invert a dictionary with unique values
Python: Swap keys and values when the values are hashable and unique.
Python✓ Tested