mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 09:22:43 +03:00
e8d2d4f364
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9014 GitOrigin-RevId: 64f51811770d88ad6d5b298fc4c71170ffd7182c
29 lines
997 B
Haskell
29 lines
997 B
Haskell
-- | The RQL IR representation of an invocation of a stored procedure.
|
|
module Hasura.StoredProcedure.IR
|
|
( StoredProcedure (..),
|
|
)
|
|
where
|
|
|
|
import Hasura.LogicalModel.IR
|
|
import Hasura.Prelude
|
|
import Hasura.RQL.Types.Backend
|
|
import Hasura.StoredProcedure.Metadata
|
|
import Language.GraphQL.Draft.Syntax qualified as G
|
|
|
|
-- | The RQL IR representation of an invocation of a stored procedure.
|
|
data StoredProcedure b field = StoredProcedure
|
|
{ -- | The SQL name of the stored procedure.
|
|
spStoredProcedure :: FunctionName b,
|
|
-- | The graphql name of the stored procedure.
|
|
spGraphqlName :: G.Name,
|
|
-- | The arguments passed to the query, if any.
|
|
spArgs :: HashMap ArgumentName (ScalarType b, field),
|
|
-- | The return type of the stored procedure
|
|
spLogicalModel :: LogicalModel b
|
|
}
|
|
deriving (Functor, Foldable, Traversable)
|
|
|
|
deriving instance (Backend b, Eq field) => Eq (StoredProcedure b field)
|
|
|
|
deriving instance (Backend b, Show field) => Show (StoredProcedure b field)
|