mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-16 01:44:03 +03:00
f6fd9f071d
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9002 GitOrigin-RevId: 2e2a499f5035adf1493a2d675ee52abb7c87a8c8
29 lines
1015 B
Haskell
29 lines
1015 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.RQL.Types.Column (ColumnValue)
|
|
import Hasura.StoredProcedure.Metadata
|
|
|
|
-- | The RQL IR representation of an invocation of a stored procedure.
|
|
data StoredProcedure b field = StoredProcedure
|
|
{ -- | The graphql name of the stored procedure.
|
|
spRootFieldName :: StoredProcedureName,
|
|
-- | The raw sql to use in the query
|
|
spInterpolatedQuery :: InterpolatedQuery field,
|
|
-- | The arguments passed to the query, if any.
|
|
spArgs :: HashMap NativeQueryArgumentName (ColumnValue b),
|
|
-- | 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)
|