2023-01-19 14:25:52 +03:00
|
|
|
-- | This module contains the default types and functions that model Native
|
|
|
|
-- Queries.
|
|
|
|
module Hasura.NativeQuery.IR
|
|
|
|
( NativeQueryImpl (..),
|
|
|
|
)
|
|
|
|
where
|
|
|
|
|
|
|
|
import Hasura.NativeQuery.Metadata
|
|
|
|
import Hasura.NativeQuery.Types
|
|
|
|
import Hasura.Prelude
|
|
|
|
import Hasura.RQL.Types.Column (ColumnValue)
|
|
|
|
|
|
|
|
-- | The default implementation of an invocation of a native query.
|
|
|
|
data NativeQueryImpl b field = NativeQueryImpl
|
|
|
|
{ -- | The defined name of the native query.
|
|
|
|
-- When translating this is used as a key to look up the actual
|
|
|
|
-- native query definition.
|
|
|
|
nqName :: NativeQueryName,
|
|
|
|
-- | The arguments passed to the native query, if any.
|
2023-01-27 17:36:35 +03:00
|
|
|
nqArgs :: HashMap NativeQueryArgumentName (ColumnValue b),
|
|
|
|
-- | The raw sql to use in the query
|
|
|
|
nqRawBody :: Text
|
2023-01-19 14:25:52 +03:00
|
|
|
}
|
|
|
|
deriving (Eq, Functor, Foldable, Traversable, Show)
|