Presently there is no way to determine the order of fields retrieved out of any SQL that was executed, because the row data is slotted into a hash-map, and the ordering is lost. I did consider changing this to use an array-map, but this only works up to 16 elements, and in any regard, this is copy-on-write so performance is not great.
Instead, the ordered keys are added as meta data to the result-seq, so they can be extracted out as follows:
Presently there is no way to determine the order of fields retrieved out of any SQL that was executed, because the row data is slotted into a hash-map, and the ordering is lost. I did consider changing this to use an array-map, but this only works up to 16 elements, and in any regard, this is copy-on-write so performance is not great.
Instead, the ordered keys are added as meta data to the result-seq, so they can be extracted out as follows: