rename NativeQuery module hierarchy to LogicalModel

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8063
GitOrigin-RevId: 0ed0cee7fb1d77f166770caae21cc05d5dd30b75
This commit is contained in:
Gil Mizrahi 2023-02-22 11:22:22 +02:00 committed by hasura-bot
parent 68e8091fda
commit 2b0e9ea14c
23 changed files with 36 additions and 36 deletions

View File

@ -739,11 +739,11 @@ library
, Hasura.Server.Auth.JWT
, Hasura.GC
, Hasura.NativeQuery.IR
, Hasura.NativeQuery.Metadata
, Hasura.NativeQuery.API
, Hasura.NativeQuery.Schema
, Hasura.NativeQuery.Types
, Hasura.LogicalModel.IR
, Hasura.LogicalModel.Metadata
, Hasura.LogicalModel.API
, Hasura.LogicalModel.Schema
, Hasura.LogicalModel.Types
, Hasura.Server.Auth.WebHook
, Hasura.Server.Middleware

View File

@ -11,7 +11,7 @@ import Database.PG.Query qualified as PG
import Hasura.Backends.Postgres.Connection qualified as PG
import Hasura.Backends.Postgres.Connection.Connect (withPostgresDB)
import Hasura.Base.Error
import Hasura.NativeQuery.Metadata
import Hasura.LogicalModel.Metadata
import Hasura.Prelude
import Hasura.SQL.Backend

View File

@ -65,8 +65,8 @@ import Hasura.GraphQL.Schema.Parser qualified as P
import Hasura.GraphQL.Schema.Select
import Hasura.GraphQL.Schema.Update qualified as SU
import Hasura.GraphQL.Schema.Update.Batch qualified as SUB
import Hasura.LogicalModel.Schema qualified as LogicalModels
import Hasura.Name qualified as Name
import Hasura.NativeQuery.Schema qualified as LogicalModels
import Hasura.Prelude
import Hasura.RQL.IR.BoolExp
import Hasura.RQL.IR.Root (RemoteRelationshipField)

View File

@ -113,7 +113,7 @@ import Data.String (fromString)
import Data.Text (pack)
import Data.Text.Extended
import Hasura.Backends.Postgres.SQL.Types
import Hasura.NativeQuery.Metadata
import Hasura.LogicalModel.Metadata
import Hasura.Prelude
import Hasura.SQL.Types
import Text.Builder qualified as TB

View File

@ -41,8 +41,8 @@ import Hasura.Backends.Postgres.SQL.Types
import Hasura.Backends.Postgres.Translate.Select.Internal.Aliases
import Hasura.Backends.Postgres.Translate.Types (CustomSQLCTEs (..))
import Hasura.Backends.Postgres.Types.Function
import Hasura.NativeQuery.IR (NativeQuery (..))
import Hasura.NativeQuery.Metadata (LogicalModelName (..))
import Hasura.LogicalModel.IR (NativeQuery (..))
import Hasura.LogicalModel.Metadata (LogicalModelName (..))
import Hasura.Prelude
import Hasura.RQL.IR
import Hasura.RQL.Types.Common (FieldName)

View File

@ -81,7 +81,7 @@ import Hasura.Backends.Postgres.Translate.Types
import Hasura.GraphQL.Schema.NamingCase (NamingCase)
import Hasura.GraphQL.Schema.Node (currentNodeIdVersion, nodeIdVersionInt)
import Hasura.GraphQL.Schema.Options qualified as Options
import Hasura.NativeQuery.IR (NativeQuery (..))
import Hasura.LogicalModel.IR (NativeQuery (..))
import Hasura.Prelude
import Hasura.RQL.IR.BoolExp
import Hasura.RQL.IR.OrderBy (OrderByItemG (OrderByItemG, obiColumn))

View File

@ -34,7 +34,7 @@ import Data.HashMap.Strict qualified as HM
import Data.Int (Int64)
import Hasura.Backends.Postgres.SQL.DML qualified as Postgres
import Hasura.Backends.Postgres.SQL.Types qualified as Postgres
import Hasura.NativeQuery.Metadata (InterpolatedQuery)
import Hasura.LogicalModel.Metadata (InterpolatedQuery)
import Hasura.Prelude
import Hasura.RQL.IR.Select
import Hasura.RQL.Types.Common

View File

@ -45,7 +45,7 @@ import Hasura.GraphQL.ApolloFederation (ApolloFederationParserFunction)
import Hasura.GraphQL.Schema.Common
import Hasura.GraphQL.Schema.NamingCase
import Hasura.GraphQL.Schema.Parser hiding (Type)
import Hasura.NativeQuery.Metadata (NativeQueryInfo)
import Hasura.LogicalModel.Metadata (NativeQueryInfo)
import Hasura.Prelude
import Hasura.RQL.IR
import Hasura.RQL.IR.Insert qualified as IR

View File

@ -1,7 +1,7 @@
{-# LANGUAGE UndecidableInstances #-}
-- | Define and handle v1/metadata API operations to track, untrack, and get logical models.
module Hasura.NativeQuery.API
module Hasura.LogicalModel.API
( GetLogicalModel (..),
TrackLogicalModel (..),
UntrackLogicalModel (..),
@ -9,7 +9,7 @@ module Hasura.NativeQuery.API
runTrackLogicalModel,
runUntrackLogicalModel,
dropLogicalModelInMetadata,
module Hasura.NativeQuery.Types,
module Hasura.LogicalModel.Types,
)
where
@ -22,9 +22,9 @@ import Data.HashMap.Strict.InsOrd.Extended qualified as OMap
import Hasura.Base.Error
import Hasura.CustomReturnType (CustomReturnType)
import Hasura.EncJSON
import Hasura.LogicalModel.Metadata (NativeQueryArgumentName, NativeQueryInfo (..), parseInterpolatedQuery)
import Hasura.LogicalModel.Types
import Hasura.Metadata.DTO.Utils (codecNamePrefix)
import Hasura.NativeQuery.Metadata (NativeQueryArgumentName, NativeQueryInfo (..), parseInterpolatedQuery)
import Hasura.NativeQuery.Types
import Hasura.Prelude
import Hasura.RQL.Types.Backend (Backend, ScalarType, SourceConnConfiguration)
import Hasura.RQL.Types.Common (SourceName, sourceNameToText, successMsg)

View File

@ -1,11 +1,11 @@
-- | This module contains the default types and functions that model Native
-- Queries.
module Hasura.NativeQuery.IR
module Hasura.LogicalModel.IR
( NativeQuery (..),
)
where
import Hasura.NativeQuery.Metadata
import Hasura.LogicalModel.Metadata
import Hasura.Prelude
import Hasura.RQL.Types.Backend
import Hasura.RQL.Types.Column (ColumnValue)

View File

@ -3,14 +3,14 @@
-- | This module houses the types and functions associated with the default
-- implementation of the metadata of native queries.
module Hasura.NativeQuery.Metadata
module Hasura.LogicalModel.Metadata
( LogicalModelName (..),
NativeQueryInfo (..),
NativeQueryArgumentName (..),
InterpolatedItem (..),
InterpolatedQuery (..),
parseInterpolatedQuery,
module Hasura.NativeQuery.Types,
module Hasura.LogicalModel.Types,
)
where
@ -20,8 +20,8 @@ import Data.Aeson
import Data.Bifunctor (first)
import Data.Text qualified as T
import Hasura.CustomReturnType (CustomReturnType)
import Hasura.LogicalModel.Types
import Hasura.Metadata.DTO.Utils (codecNamePrefix)
import Hasura.NativeQuery.Types
import Hasura.Prelude hiding (first)
import Hasura.RQL.Types.Backend
import Hasura.SQL.Backend

View File

@ -1,7 +1,7 @@
{-# LANGUAGE QuasiQuotes #-}
-- | Schema parsers for logical models.
module Hasura.NativeQuery.Schema (defaultBuildLogicalModelRootFields) where
module Hasura.LogicalModel.Schema (defaultBuildLogicalModelRootFields) where
import Data.Has (Has (getter))
import Data.HashMap.Strict qualified as HM
@ -20,8 +20,8 @@ import Hasura.GraphQL.Schema.Parser qualified as P
import Hasura.GraphQL.Schema.Select
( customTypeSelectionList,
)
import Hasura.NativeQuery.IR (NativeQuery (..))
import Hasura.NativeQuery.Metadata
import Hasura.LogicalModel.IR (NativeQuery (..))
import Hasura.LogicalModel.Metadata
import Hasura.Prelude
import Hasura.RQL.IR.BoolExp (gBoolExpTrue)
import Hasura.RQL.IR.Root (RemoteRelationshipField)

View File

@ -1,5 +1,5 @@
-- | A name for a logical model as it is recognized by the graphql schema.
module Hasura.NativeQuery.Types
module Hasura.LogicalModel.Types
( LogicalModelName (..),
)
where

View File

@ -40,8 +40,8 @@ import Data.Text.Extended (dquote, dquoteList, (<<>))
import Hasura.Base.Error
import Hasura.EncJSON
import Hasura.Logging qualified as HL
import Hasura.LogicalModel.API
import Hasura.Metadata.Class
import Hasura.NativeQuery.API
import Hasura.Prelude hiding (first)
import Hasura.RQL.DDL.Action
import Hasura.RQL.DDL.ComputedField

View File

@ -155,7 +155,7 @@ import Data.Sequence qualified as Seq
import Hasura.Backends.Postgres.SQL.Types qualified as Postgres
import Hasura.GraphQL.Schema.NamingCase (NamingCase)
import Hasura.GraphQL.Schema.Options (StringifyNumbers)
import Hasura.NativeQuery.IR (NativeQuery)
import Hasura.LogicalModel.IR (NativeQuery)
import Hasura.Prelude
import Hasura.RQL.IR.BoolExp
import Hasura.RQL.IR.OrderBy

View File

@ -11,7 +11,7 @@ import Hasura.Base.Error
import Hasura.GraphQL.Schema.NamingCase
import Hasura.Incremental qualified as Inc
import Hasura.Logging (Hasura, Logger)
import Hasura.NativeQuery.Metadata (NativeQueryInfo)
import Hasura.LogicalModel.Metadata (NativeQueryInfo)
import Hasura.Prelude
import Hasura.RQL.IR.BoolExp
import Hasura.RQL.Types.Backend

View File

@ -81,9 +81,9 @@ import Data.List.Extended qualified as L
import Data.Maybe (fromJust)
import Data.Text qualified as T
import Data.Text.Extended qualified as T
import Hasura.LogicalModel.Metadata (LogicalModelName, NativeQueryInfo (..))
import Hasura.Metadata.DTO.Placeholder (placeholderCodecViaJSON)
import Hasura.Metadata.DTO.Utils (codecNamePrefix)
import Hasura.NativeQuery.Metadata (LogicalModelName, NativeQueryInfo (..))
import Hasura.Prelude
import Hasura.RQL.Types.Action
import Hasura.RQL.Types.Allowlist

View File

@ -43,7 +43,7 @@ import Data.Text.Extended
import Hasura.Backends.DataConnector.Adapter.Types (DataConnectorName)
import Hasura.Base.ErrorMessage
import Hasura.Base.ToErrorValue
import Hasura.NativeQuery.Types
import Hasura.LogicalModel.Types
import Hasura.Prelude
import Hasura.RQL.Types.Action
import Hasura.RQL.Types.Backend

View File

@ -25,7 +25,7 @@ import Data.Aeson.Ordered qualified as AO
import Data.HashMap.Strict.InsOrd.Extended qualified as OM
import Data.Text.Extended qualified as T
import Data.Vector qualified as Vector
import Hasura.NativeQuery.Metadata (NativeQueryInfo (..))
import Hasura.LogicalModel.Metadata (NativeQueryInfo (..))
import Hasura.Prelude
import Hasura.RQL.Types.Action
( ActionDefinition (..),

View File

@ -21,8 +21,8 @@ import GHC.Generics.Extended (constrName)
import Hasura.Base.Error
import Hasura.EncJSON
import Hasura.Logging qualified as L
import Hasura.LogicalModel.API qualified as LogicalModels
import Hasura.Metadata.Class
import Hasura.NativeQuery.API qualified as LogicalModels
import Hasura.Prelude hiding (first)
import Hasura.RQL.DDL.Action
import Hasura.RQL.DDL.ApiLimit

View File

@ -3,7 +3,7 @@ module Hasura.Server.API.Metadata
)
where
import Hasura.NativeQuery.API qualified as LogicalModels
import Hasura.LogicalModel.API qualified as LogicalModels
import Hasura.RQL.DDL.Action
import Hasura.RQL.DDL.ComputedField
import Hasura.RQL.DDL.ConnectionTemplate

View File

@ -40,7 +40,7 @@ import Data.Text qualified as T
import Data.Text.Conversions (UTF8 (..), decodeText)
import Hasura.HTTP
import Hasura.Logging
import Hasura.NativeQuery.Metadata (NativeQueryInfo, nqiArguments)
import Hasura.LogicalModel.Metadata (NativeQueryInfo, nqiArguments)
import Hasura.Prelude
import Hasura.RQL.Types.Action
import Hasura.RQL.Types.Common

View File

@ -7,7 +7,7 @@ module Hasura.Backends.Postgres.LogicalModels.LogicalModelsSpec
where
import Hasura.Base.Error.TestInstances ()
import Hasura.NativeQuery.Metadata
import Hasura.LogicalModel.Metadata
import Test.Hspec (Spec, describe, it, shouldBe)
import Prelude