Copyright | (c) Aaron Allen 2020 |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | Aaron Allen <aaronallen8455@gmail.com> |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
Documentation
:: (TypeAtPath o tree path ~ target, ReflectPath path) | |
=> proxy (path :: k) | A path proxy |
-> ObjectTree tree o | Typson schema |
-> Col PG (Json o) | Column selector |
-> Col PG (Json target) |
Use a type-safe JSON path as part of a query.
query $ jsonPath (Proxy @("foo" :-> "bar")) fieldSchemaJ . (! #field) <$> select someTable
Use this wrapper on fields that are serialized as JSON in the database.
It's deserialization treats SQL NULL
as JSON null
.