Package

purescript-oooooooooorrrrrrrmm-lib

Repository
mikesol/purescript-oooooooooorrrrrrrmm-lib
License
BSD-3-Clause
Uploaded by
pacchettibotti
Published on
2024-08-13T19:37:33Z

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 by pg.
  • useMaybe: takes a pg return type with Nullable entires and converts them to Maybes.
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 } ]
Modules
OOOOOOOOOORRRRRRRMM.Lib
Dependencies