graphql-engine/server/src-lib/Hasura/Backends/Postgres/Translate/Column.hs
Rakesh Emmadi 9ef603360c server: generalize schema cache building (#496)
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
2021-02-14 06:08:46 +00:00

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