Moebius.Transformer

The results that come back from Postgrex are in a bit of a convoluted form with string key maps that aren’t terribly useful. This module restructures the results.

Summary

Functions

Coerce a large result set into an array of atom-keyed maps

String keys are a pain, atom maps are nicer

Coerces a Postgrex.Result into a single atom-keyed map

Functions

to_list(arg)

Coerce a large result set into an array of atom-keyed maps

to_map(list, acc \\ %{})

String keys are a pain, atom maps are nicer

to_single(arg)

Coerces a Postgrex.Result into a single atom-keyed map