mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-18 04:51:35 +03:00
d8c56a40f6
GitOrigin-RevId: f1291946a1122220e82371676d88867fd7b2b7c4
19 lines
526 B
Haskell
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
|