mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-17 12:31:52 +03:00
ba70ca427a
GitOrigin-RevId: 660126d5f65620fb58a3ffcbed564e9e35f59938
19 lines
535 B
Haskell
19 lines
535 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 pgKind) -> SQLExp
|
|
toTxtValue ColumnValue{..} =
|
|
withTyAnn ty . withConstructorFn ty $ txtEncoder cvValue
|
|
where
|
|
ty = unsafePGColumnToBackend cvType
|