mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-18 04:51:35 +03:00
9ef603360c
Co-authored-by: Vamshi Surabhi <vamshi@hasura.io> Co-authored-by: Vladimir Ciobanu <admin@cvlad.info> Co-authored-by: Antoine Leblanc <antoine@hasura.io> Co-authored-by: Stylish Haskell Bot <stylish-haskell@users.noreply.github.com> GitOrigin-RevId: 9d631878037637f3ed2994b5d0525efd978f7b8f
18 lines
471 B
Haskell
18 lines
471 B
Haskell
module Hasura.Backends.Postgres.Translate.Column
|
|
( toTxtValue
|
|
) where
|
|
|
|
import Hasura.Prelude
|
|
|
|
import Hasura.Backends.Postgres.SQL.DML
|
|
import Hasura.Backends.Postgres.SQL.Value
|
|
import Hasura.RQL.Types.Column
|
|
import Hasura.SQL.Backend
|
|
|
|
|
|
toTxtValue :: ColumnValue 'Postgres -> SQLExp
|
|
toTxtValue ColumnValue{..} =
|
|
withTyAnn ty . withConstructorFn ty $ txtEncoder cvValue
|
|
where
|
|
ty = unsafePGColumnToBackend cvType
|