A smöl PureScript library for working with SQL generated by oooooooooorrrrrrrmm
.
It currently consists of two functions, both of which are in the test.
-
toValues
: converts a record to an array of values consumable bypg
. -
useMaybe
: takes apg
return type withNullable
entires and converts them toMaybe
s.
vals :: Array Foreign
vals = toValues { "$1": 42, "$2": "hello" }
ret :: Array { id :: Int, name :: Maybe String }
ret = useMaybe [ { id: 42, name: notNull "hello" }, { id: 43, name: null } ]