mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-22 06:51:32 +03:00
3cbcbd9291
## Description This PR removes `RQL.Types`, which was now only re-exporting a bunch of unrelated modules. PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4363 GitOrigin-RevId: 894f29a19bff70b3dad8abc5d9858434d5065417
34 lines
1.1 KiB
Haskell
34 lines
1.1 KiB
Haskell
module Hasura.Backends.Postgres.RQLGenerator.GenAnnSelectG
|
|
( genAnnSelectG,
|
|
)
|
|
where
|
|
|
|
import Hasura.Backends.Postgres.RQLGenerator.GenSelectArgsG (genSelectArgsG)
|
|
import Hasura.Backends.Postgres.RQLGenerator.GenSelectFromG (genSelectFromG)
|
|
import Hasura.Backends.Postgres.RQLGenerator.GenTablePermG (genTablePermG)
|
|
import Hasura.Generator.Common (defaultRange)
|
|
import Hasura.Prelude hiding (bool)
|
|
import Hasura.RQL.IR.Generator (genFields)
|
|
import Hasura.RQL.IR.Select (AnnSelectG (AnnSelectG))
|
|
import Hasura.RQL.Types.Common
|
|
import Hasura.SQL.Backend
|
|
import Hedgehog (MonadGen)
|
|
import Hedgehog.Gen qualified as Gen
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
genAnnSelectG :: forall m f a. MonadGen m => m a -> m (f a) -> m (AnnSelectG ('Postgres 'Vanilla) f a)
|
|
genAnnSelectG genA genFA =
|
|
AnnSelectG
|
|
<$> genFields genFA defaultRange defaultRange
|
|
<*> genSelectFromG genA
|
|
<*> genTablePermG genA
|
|
<*> genArgs
|
|
<*> genStringifyNumbers
|
|
where
|
|
genStringifyNumbers =
|
|
Gen.bool <&> \case
|
|
False -> LeaveNumbersAlone
|
|
True -> StringifyNumbers
|
|
genArgs = genSelectArgsG genA
|