array-map creates a PersistentArrayMap: an associative map with hash-map-like behavior, linear implementation, and insertion order during iteration. section 11.1.2
Its contract is:
- Accepts an even sequence of key-value arguments, including no arguments. section 11.1.2
- Throws IllegalArgumentException when a value is missing. section 11.1.2
- Lets the last value override duplicate keys while retaining metadata from the original key. section 11.1.2
- May promote itself to a PersistentHashMap when assoc or related operations require scaling; it does not scale beyond a few hundred entries. section 11.1.2
Preserving column order
Use an array-map to define CSV columns in export order, pairing each column name with its database field and validation function. Iteration then follows the declared column sequence.
