graphql-engine/server/src-lib/Hasura/Backends/Postgres/Translate/Column.hs
Antoine Leblanc d8c56a40f6 server: split boolean operators between core and backend-specific
GitOrigin-RevId: f1291946a1122220e82371676d88867fd7b2b7c4
2021-03-25 17:51:08 +00:00

19 lines
526 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.Backends.Postgres.Types.Column
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