chore: increase columns length in .stylish-haskell.yaml
This gives the import statements more space, essentially, it collectively removes 90+ unneeded lines in the imports statements. Signed-off-by: Taimoor Zaeem <taimoorzaeem@gmail.com>
This commit is contained in:
@@ -200,7 +200,7 @@ steps:
|
||||
|
||||
# A common setting is the number of columns (parts of) code will be wrapped
|
||||
# to. Different steps take this into account. Default: 80.
|
||||
columns: 70
|
||||
columns: 80
|
||||
|
||||
# By default, line endings are converted according to the OS. You can override
|
||||
# preferred format here.
|
||||
|
||||
+1
-2
@@ -37,8 +37,7 @@ import Data.Text (Text)
|
||||
import GHC.Driver.Errors.Types (GhcMessage)
|
||||
import GHC.Generics (Generic)
|
||||
import GHC.Hs.Extension (GhcPs)
|
||||
import GHC.Types.Error (Messages, defaultDiagnosticOpts,
|
||||
getMessages)
|
||||
import GHC.Types.Error (Messages, defaultDiagnosticOpts, getMessages)
|
||||
import GHC.Types.Name.Occurrence (occNameString)
|
||||
import GHC.Types.Name.Reader (rdrNameOcc)
|
||||
import GHC.Unit.Module (moduleNameString)
|
||||
|
||||
@@ -20,8 +20,7 @@ import qualified Data.Text.Encoding as T
|
||||
import Data.List (lookup)
|
||||
import Data.Ranged.Ranges (emptyRange, rangeIntersection,
|
||||
rangeIsEmpty)
|
||||
import Network.HTTP.Types.Header (RequestHeaders,
|
||||
hAuthorization, hCookie)
|
||||
import Network.HTTP.Types.Header (RequestHeaders, hAuthorization, hCookie)
|
||||
import Network.Wai (Request (..))
|
||||
import Network.Wai.Middleware.HttpAuth (extractBearerAuth)
|
||||
import Network.Wai.Parse (parseHttpAccept)
|
||||
@@ -30,21 +29,17 @@ import Web.Cookie (parseCookies)
|
||||
import PostgREST.ApiRequest.Payload (getPayload)
|
||||
import PostgREST.ApiRequest.QueryParams (QueryParams (..))
|
||||
import PostgREST.ApiRequest.Types (Action (..), DbAction (..),
|
||||
InvokeMethod (..),
|
||||
Mutation (..), Payload (..),
|
||||
RequestBody, Resource (..))
|
||||
import PostgREST.Config (AppConfig (..),
|
||||
OpenAPIMode (..))
|
||||
InvokeMethod (..), Mutation (..),
|
||||
Payload (..), RequestBody,
|
||||
Resource (..))
|
||||
import PostgREST.Config (AppConfig (..), OpenAPIMode (..))
|
||||
import PostgREST.Config.Database (TimezoneNames)
|
||||
import PostgREST.Error (ApiRequestError (..),
|
||||
RangeError (..))
|
||||
import PostgREST.Error (ApiRequestError (..), RangeError (..))
|
||||
import PostgREST.MediaType (MediaType (..))
|
||||
import PostgREST.RangeQuery (NonnegRange, allRange,
|
||||
convertToLimitZeroRange,
|
||||
hasLimitZero,
|
||||
convertToLimitZeroRange, hasLimitZero,
|
||||
rangeRequested)
|
||||
import PostgREST.SchemaCache.Identifiers (FieldName,
|
||||
QualifiedIdentifier (..),
|
||||
import PostgREST.SchemaCache.Identifiers (FieldName, QualifiedIdentifier (..),
|
||||
Schema)
|
||||
|
||||
import qualified PostgREST.ApiRequest.Preferences as Preferences
|
||||
|
||||
@@ -39,34 +39,28 @@ import Data.List (init, last)
|
||||
import Data.Ranged.Boundaries (Boundary (..))
|
||||
import Data.Ranged.Ranges (Range (..))
|
||||
import Data.Tree (Tree (..))
|
||||
import Text.Parsec.Error (errorMessages,
|
||||
showErrorMessages)
|
||||
import Text.ParserCombinators.Parsec (GenParser, ParseError, Parser,
|
||||
anyChar, between, char, choice,
|
||||
digit, eof, errorPos, letter,
|
||||
lookAhead, many1, noneOf,
|
||||
notFollowedBy, oneOf,
|
||||
optionMaybe, sepBy, sepBy1,
|
||||
string, try, (<?>))
|
||||
import Text.Parsec.Error (errorMessages, showErrorMessages)
|
||||
import Text.ParserCombinators.Parsec (GenParser, ParseError, Parser, anyChar,
|
||||
between, char, choice, digit, eof,
|
||||
errorPos, letter, lookAhead, many1,
|
||||
noneOf, notFollowedBy, oneOf, optionMaybe,
|
||||
sepBy, sepBy1, string, try, (<?>))
|
||||
|
||||
import PostgREST.RangeQuery (NonnegRange, allRange,
|
||||
rangeGeq, rangeLimit,
|
||||
rangeOffset, restrictRange)
|
||||
import PostgREST.RangeQuery (NonnegRange, allRange, rangeGeq,
|
||||
rangeLimit, rangeOffset,
|
||||
restrictRange)
|
||||
import PostgREST.SchemaCache.Identifiers (FieldName)
|
||||
|
||||
import PostgREST.ApiRequest.Types (AggregateFunction (..),
|
||||
EmbedParam (..), EmbedPath, Field,
|
||||
Filter (..), FtsOperator (..),
|
||||
Hint, IsVal (..), JoinType (..),
|
||||
JsonOperand (..),
|
||||
JsonOperation (..), JsonPath,
|
||||
ListVal, LogicOperator (..),
|
||||
LogicTree (..), OpExpr (..),
|
||||
OpQuantifier (..), Operation (..),
|
||||
OrderDirection (..),
|
||||
import PostgREST.ApiRequest.Types (AggregateFunction (..), EmbedParam (..),
|
||||
EmbedPath, Field, Filter (..),
|
||||
FtsOperator (..), Hint, IsVal (..),
|
||||
JoinType (..), JsonOperand (..),
|
||||
JsonOperation (..), JsonPath, ListVal,
|
||||
LogicOperator (..), LogicTree (..),
|
||||
OpExpr (..), OpQuantifier (..),
|
||||
Operation (..), OrderDirection (..),
|
||||
OrderNulls (..), OrderTerm (..),
|
||||
QuantOperator (..),
|
||||
SelectItem (..),
|
||||
QuantOperator (..), SelectItem (..),
|
||||
SimpleOperator (..), SingleVal)
|
||||
|
||||
import PostgREST.Error (QPError (..))
|
||||
|
||||
@@ -42,8 +42,7 @@ module PostgREST.ApiRequest.Types
|
||||
import qualified Data.ByteString.Lazy as LBS
|
||||
import qualified Data.Set as S
|
||||
|
||||
import PostgREST.SchemaCache.Identifiers (FieldName,
|
||||
QualifiedIdentifier (..),
|
||||
import PostgREST.SchemaCache.Identifiers (FieldName, QualifiedIdentifier (..),
|
||||
Schema)
|
||||
|
||||
import Protolude
|
||||
|
||||
@@ -27,12 +27,10 @@ import System.IO.Error (ioeGetErrorType)
|
||||
|
||||
import Control.Monad.Except (liftEither)
|
||||
import Data.Either.Combinators (mapLeft, whenLeft)
|
||||
import Data.IORef (atomicWriteIORef, newIORef,
|
||||
readIORef)
|
||||
import Data.IORef (atomicWriteIORef, newIORef, readIORef)
|
||||
import Data.String (IsString (..), String)
|
||||
import Network.Wai.Handler.Warp (defaultSettings, setBeforeMainLoop,
|
||||
setHost, setOnException, setPort,
|
||||
setServerName)
|
||||
import Network.Wai.Handler.Warp (defaultSettings, setBeforeMainLoop, setHost,
|
||||
setOnException, setPort, setServerName)
|
||||
|
||||
import qualified Data.Text.Encoding as T
|
||||
import qualified Network.Wai as Wai
|
||||
@@ -59,8 +57,7 @@ import PostgREST.Config (AppConfig (..))
|
||||
import PostgREST.Error (Error)
|
||||
import PostgREST.Network (resolveSocketToAddress)
|
||||
import PostgREST.Observation (Observation (..))
|
||||
import PostgREST.Response.Performance (ServerTiming (..),
|
||||
serverTimingHeader)
|
||||
import PostgREST.Response.Performance (ServerTiming (..), serverTimingHeader)
|
||||
import PostgREST.SchemaCache (SchemaCache (..))
|
||||
import PostgREST.TimeIt (timeItT)
|
||||
import PostgREST.Version (docsVersion, prettyVersion)
|
||||
@@ -68,8 +65,7 @@ import PostgREST.Version (docsVersion, prettyVersion)
|
||||
import Control.Monad.Writer
|
||||
import qualified Data.ByteString.Char8 as BS
|
||||
import qualified Data.List as L
|
||||
import Data.Streaming.Network (HostPreference,
|
||||
bindPortGenEx,
|
||||
import Data.Streaming.Network (HostPreference, bindPortGenEx,
|
||||
bindPortTCP)
|
||||
import qualified Data.Text as T
|
||||
import qualified Network.HTTP.Types as HTTP
|
||||
|
||||
@@ -44,30 +44,22 @@ import PostgREST.Observation
|
||||
import PostgREST.TimeIt (timeItT)
|
||||
import PostgREST.Version (prettyVersion)
|
||||
|
||||
import Control.AutoUpdate (defaultUpdateSettings, mkAutoUpdate,
|
||||
updateAction)
|
||||
import Control.AutoUpdate (defaultUpdateSettings, mkAutoUpdate, updateAction)
|
||||
import Control.Retry (RetryPolicy, RetryStatus (..), capDelay,
|
||||
exponentialBackoff, retrying,
|
||||
rsPreviousDelay)
|
||||
import Data.IORef (IORef, atomicWriteIORef, newIORef,
|
||||
readIORef)
|
||||
exponentialBackoff, retrying, rsPreviousDelay)
|
||||
import Data.IORef (IORef, atomicWriteIORef, newIORef, readIORef)
|
||||
import Data.Time.Clock (UTCTime, getCurrentTime)
|
||||
|
||||
import Control.Concurrent.STM (TMVar, newEmptyTMVarIO,
|
||||
putTMVar, readTMVar,
|
||||
tryReadTMVar, tryTakeTMVar)
|
||||
import Control.Concurrent.STM (TMVar, newEmptyTMVarIO, putTMVar,
|
||||
readTMVar, tryReadTMVar, tryTakeTMVar)
|
||||
import PostgREST.Auth.JwtCache (JwtCacheState, update)
|
||||
import PostgREST.Config (AppConfig (..),
|
||||
readAppConfig,
|
||||
import PostgREST.Config (AppConfig (..), readAppConfig,
|
||||
toConnectionSettings)
|
||||
import PostgREST.Config.Database (queryDbSettings,
|
||||
queryPgVersion,
|
||||
import PostgREST.Config.Database (queryDbSettings, queryPgVersion,
|
||||
queryRoleSettings)
|
||||
import PostgREST.Config.PgVersion (PgVersion (..),
|
||||
minimumPgVersion)
|
||||
import PostgREST.Config.PgVersion (PgVersion (..), minimumPgVersion)
|
||||
import PostgREST.Debounce (makeDebouncer)
|
||||
import PostgREST.SchemaCache (SchemaCache (..),
|
||||
querySchemaCache,
|
||||
import PostgREST.SchemaCache (SchemaCache (..), querySchemaCache,
|
||||
showSummary)
|
||||
import PostgREST.SchemaCache.Identifiers (quoteQi)
|
||||
|
||||
|
||||
@@ -15,8 +15,7 @@ module PostgREST.Auth
|
||||
( getAuthResult )
|
||||
where
|
||||
|
||||
import PostgREST.AppState (AppState, getConfig, getJwtCacheState,
|
||||
getTime)
|
||||
import PostgREST.AppState (AppState, getConfig, getJwtCacheState, getTime)
|
||||
import PostgREST.Auth.Jwt (parseClaims)
|
||||
import PostgREST.Auth.JwtCache (lookupJwtCache)
|
||||
import PostgREST.Auth.Types (AuthResult)
|
||||
|
||||
@@ -24,13 +24,12 @@ import qualified Data.Aeson.KeyMap as KM
|
||||
|
||||
import PostgREST.Error (Error (..), JwtError (JwtSecretMissing))
|
||||
|
||||
import Control.Concurrent.STM (newTVarIO, readTVar,
|
||||
writeTVar)
|
||||
import Control.Concurrent.STM (newTVarIO, readTVar, writeTVar)
|
||||
import Control.Concurrent.STM.TVar (TVar)
|
||||
import Control.Monad.Error.Class (liftEither)
|
||||
import Data.ByteString hiding (all, init)
|
||||
import Data.IORef (IORef, newIORef,
|
||||
readIORef, writeIORef)
|
||||
import Data.IORef (IORef, newIORef, readIORef,
|
||||
writeIORef)
|
||||
import Jose.Jwk (JwkSet)
|
||||
import PostgREST.Auth.Jwt (parseAndDecodeClaims)
|
||||
import PostgREST.Cache.Sieve (alwaysValid)
|
||||
|
||||
@@ -60,15 +60,12 @@ import Numeric (readOct, showOct)
|
||||
import System.Environment (getEnvironment)
|
||||
import System.Posix.Types (FileMode)
|
||||
|
||||
import PostgREST.Config.Database (RoleIsolationLvl,
|
||||
RoleSettings)
|
||||
import PostgREST.Config.JSPath (JSPath (..),
|
||||
defaultRoleJSPathKey,
|
||||
import PostgREST.Config.Database (RoleIsolationLvl, RoleSettings)
|
||||
import PostgREST.Config.JSPath (JSPath (..), defaultRoleJSPathKey,
|
||||
dumpJSPath, pRoleClaimKey)
|
||||
import PostgREST.Config.Proxy (Proxy (..),
|
||||
isMalformedProxyUri, toURI)
|
||||
import PostgREST.SchemaCache.Identifiers (QualifiedIdentifier (..),
|
||||
toQi)
|
||||
import PostgREST.Config.Proxy (Proxy (..), isMalformedProxyUri,
|
||||
toURI)
|
||||
import PostgREST.SchemaCache.Identifiers (QualifiedIdentifier (..), toQi)
|
||||
|
||||
import PostgREST.Version (prettyVersion)
|
||||
import Protolude hiding (Proxy, toList)
|
||||
|
||||
@@ -46,14 +46,10 @@ import qualified PostgREST.MediaType as MediaType
|
||||
|
||||
import PostgREST.Config (Verbosity (..))
|
||||
import PostgREST.SchemaCache (SchemaCache (SchemaCache, dbTablesFuzzyIndex))
|
||||
import PostgREST.SchemaCache.Identifiers (QualifiedIdentifier (..),
|
||||
Schema)
|
||||
import PostgREST.SchemaCache.Relationship (Cardinality (..),
|
||||
Junction (..),
|
||||
Relationship (..),
|
||||
RelationshipsMap)
|
||||
import PostgREST.SchemaCache.Routine (Routine (..),
|
||||
RoutineParam (..))
|
||||
import PostgREST.SchemaCache.Identifiers (QualifiedIdentifier (..), Schema)
|
||||
import PostgREST.SchemaCache.Relationship (Cardinality (..), Junction (..),
|
||||
Relationship (..), RelationshipsMap)
|
||||
import PostgREST.SchemaCache.Routine (Routine (..), RoutineParam (..))
|
||||
|
||||
import PostgREST.Error.Types
|
||||
|
||||
|
||||
@@ -22,8 +22,7 @@ import qualified Hasql.Pool as SQL
|
||||
import PostgREST.MediaType (MediaType (..))
|
||||
import PostgREST.SchemaCache (SchemaCache (..))
|
||||
import PostgREST.SchemaCache.Identifiers (QualifiedIdentifier (..))
|
||||
import PostgREST.SchemaCache.Relationship (Relationship (..),
|
||||
RelationshipsMap)
|
||||
import PostgREST.SchemaCache.Relationship (Relationship (..), RelationshipsMap)
|
||||
import PostgREST.SchemaCache.Routine (Routine (..))
|
||||
import Protolude
|
||||
|
||||
|
||||
@@ -18,8 +18,8 @@ import qualified PostgREST.Config as Config
|
||||
import Control.Arrow ((&&&))
|
||||
import Data.Bitraversable (bisequence)
|
||||
import Data.Either.Combinators (whenRight)
|
||||
import Data.IORef (IORef, newIORef,
|
||||
readIORef, writeIORef)
|
||||
import Data.IORef (IORef, newIORef, readIORef,
|
||||
writeIORef)
|
||||
import qualified Data.Text as T
|
||||
import qualified Database.PostgreSQL.LibPQ as LibPQ
|
||||
import qualified Hasql.Session as SQL
|
||||
|
||||
@@ -13,8 +13,7 @@ module PostgREST.Logger
|
||||
) where
|
||||
|
||||
import Control.AutoUpdate (defaultUpdateSettings,
|
||||
mkAutoUpdate,
|
||||
updateAction)
|
||||
mkAutoUpdate, updateAction)
|
||||
import qualified Data.ByteString.Char8 as BS
|
||||
import qualified Data.Text.Encoding as T
|
||||
import qualified Hasql.Decoders as HD
|
||||
@@ -22,8 +21,7 @@ import qualified Hasql.DynamicStatements.Snippet as SQL hiding (sql)
|
||||
import qualified Hasql.DynamicStatements.Statement as SQL
|
||||
import qualified Hasql.Statement as SQL
|
||||
|
||||
import Data.Time (ZonedTime, defaultTimeLocale, formatTime,
|
||||
getZonedTime)
|
||||
import Data.Time (ZonedTime, defaultTimeLocale, formatTime, getZonedTime)
|
||||
|
||||
import Network.HTTP.Types.Status (Status, status400, status500)
|
||||
|
||||
|
||||
@@ -16,8 +16,7 @@ module PostgREST.MainTx
|
||||
import Control.Lens ((^?))
|
||||
import Control.Monad.Extra (whenJust)
|
||||
import qualified Data.Aeson.Lens as L
|
||||
import qualified Data.ByteString as BS hiding
|
||||
(break)
|
||||
import qualified Data.ByteString as BS hiding (break)
|
||||
import qualified Data.ByteString.Char8 as BS
|
||||
import qualified Data.HashMap.Strict as HM
|
||||
import qualified Data.Set as S
|
||||
@@ -32,21 +31,17 @@ import qualified PostgREST.SchemaCache as SchemaCache
|
||||
|
||||
|
||||
import PostgREST.ApiRequest (ApiRequest (..))
|
||||
import PostgREST.ApiRequest.Preferences (PreferCount (..),
|
||||
PreferHandling (..),
|
||||
import PostgREST.ApiRequest.Preferences (PreferCount (..), PreferHandling (..),
|
||||
PreferMaxAffected (..),
|
||||
PreferTransaction (..),
|
||||
Preferences (..))
|
||||
import PostgREST.ApiRequest.Types (Mutation (..))
|
||||
import PostgREST.Auth.Types (AuthResult (..))
|
||||
import PostgREST.Config (AppConfig (..),
|
||||
OpenAPIMode (..))
|
||||
import PostgREST.Config (AppConfig (..), OpenAPIMode (..))
|
||||
import PostgREST.Error (Error)
|
||||
import PostgREST.MediaType (MediaType (..))
|
||||
import PostgREST.Plan (ActionPlan (..),
|
||||
CrudPlan (..),
|
||||
DbActionPlan (..),
|
||||
InfoPlan (..),
|
||||
import PostgREST.Plan (ActionPlan (..), CrudPlan (..),
|
||||
DbActionPlan (..), InfoPlan (..),
|
||||
InspectPlan (..))
|
||||
import PostgREST.Query (MainQuery (..))
|
||||
import PostgREST.SchemaCache (SchemaCache (..))
|
||||
|
||||
@@ -41,8 +41,7 @@ import Data.Tree (Tree (..))
|
||||
|
||||
import PostgREST.ApiRequest (ApiRequest (..))
|
||||
import PostgREST.Config (AppConfig (..))
|
||||
import PostgREST.Error (ApiRequestError (..),
|
||||
Error (..),
|
||||
import PostgREST.Error (ApiRequestError (..), Error (..),
|
||||
SchemaCacheError (..))
|
||||
import PostgREST.MediaType (MediaType (..))
|
||||
import PostgREST.Plan.Negotiate (negotiateContent)
|
||||
@@ -52,25 +51,19 @@ import PostgREST.RangeQuery (NonnegRange, allRange,
|
||||
restrictRange)
|
||||
import PostgREST.SchemaCache (SchemaCache (..))
|
||||
import PostgREST.SchemaCache.Identifiers (FieldName,
|
||||
QualifiedIdentifier (..),
|
||||
Schema)
|
||||
import PostgREST.SchemaCache.Relationship (Cardinality (..),
|
||||
Junction (..),
|
||||
QualifiedIdentifier (..), Schema)
|
||||
import PostgREST.SchemaCache.Relationship (Cardinality (..), Junction (..),
|
||||
Relationship (..),
|
||||
RelationshipsMap,
|
||||
relIsToOne)
|
||||
RelationshipsMap, relIsToOne)
|
||||
import PostgREST.SchemaCache.Representations (DataRepresentation (..),
|
||||
RepresentationsMap)
|
||||
import PostgREST.SchemaCache.Routine (MediaHandler (..),
|
||||
Routine (..),
|
||||
RoutineMap,
|
||||
RoutineParam (..),
|
||||
import PostgREST.SchemaCache.Routine (MediaHandler (..), Routine (..),
|
||||
RoutineMap, RoutineParam (..),
|
||||
funcReturnsScalar,
|
||||
funcReturnsSetOfScalar,
|
||||
funcReturnsSingle)
|
||||
import PostgREST.SchemaCache.Table (Column (..), Table (..),
|
||||
TablesMap,
|
||||
tableColumnsList,
|
||||
TablesMap, tableColumnsList,
|
||||
tablePKCols)
|
||||
|
||||
import PostgREST.ApiRequest.Preferences
|
||||
|
||||
@@ -6,10 +6,8 @@ where
|
||||
import qualified Data.ByteString.Lazy as LBS
|
||||
|
||||
import PostgREST.ApiRequest.Preferences (PreferResolution)
|
||||
import PostgREST.Plan.Types (CoercibleField,
|
||||
CoercibleLogicTree)
|
||||
import PostgREST.SchemaCache.Identifiers (FieldName,
|
||||
QualifiedIdentifier)
|
||||
import PostgREST.Plan.Types (CoercibleField, CoercibleLogicTree)
|
||||
import PostgREST.SchemaCache.Identifiers (FieldName, QualifiedIdentifier)
|
||||
|
||||
|
||||
import Protolude
|
||||
|
||||
@@ -18,8 +18,7 @@ import PostgREST.Error (ApiRequestError (..))
|
||||
import PostgREST.MediaType (MediaType (..))
|
||||
import PostgREST.SchemaCache.Identifiers (QualifiedIdentifier (..),
|
||||
RelIdentifier (..))
|
||||
import PostgREST.SchemaCache.Routine (MediaHandler (..),
|
||||
MediaHandlerMap,
|
||||
import PostgREST.SchemaCache.Routine (MediaHandler (..), MediaHandlerMap,
|
||||
ResolvedHandler)
|
||||
|
||||
import PostgREST.ApiRequest.Preferences
|
||||
|
||||
@@ -7,16 +7,14 @@ module PostgREST.Plan.ReadPlan
|
||||
|
||||
import Data.Tree (Tree (..))
|
||||
|
||||
import PostgREST.ApiRequest.Types (Alias, Depth, Hint,
|
||||
JoinType, NodeName)
|
||||
import PostgREST.ApiRequest.Types (Alias, Depth, Hint, JoinType,
|
||||
NodeName)
|
||||
import PostgREST.Plan.Types (CoercibleLogicTree,
|
||||
CoercibleOrderTerm,
|
||||
CoercibleSelectField (..),
|
||||
RelSelectField (..),
|
||||
SpreadType (..))
|
||||
RelSelectField (..), SpreadType (..))
|
||||
import PostgREST.RangeQuery (NonnegRange)
|
||||
import PostgREST.SchemaCache.Identifiers (FieldName,
|
||||
QualifiedIdentifier)
|
||||
import PostgREST.SchemaCache.Identifiers (FieldName, QualifiedIdentifier)
|
||||
import PostgREST.SchemaCache.Relationship (Relationship)
|
||||
|
||||
|
||||
|
||||
@@ -13,9 +13,8 @@ module PostgREST.Plan.Types
|
||||
, SpreadType(..)
|
||||
) where
|
||||
|
||||
import PostgREST.ApiRequest.Types (AggregateFunction, Alias, Cast,
|
||||
Field, JsonPath, Language,
|
||||
LogicOperator, OpExpr,
|
||||
import PostgREST.ApiRequest.Types (AggregateFunction, Alias, Cast, Field,
|
||||
JsonPath, Language, LogicOperator, OpExpr,
|
||||
OrderDirection, OrderNulls)
|
||||
|
||||
import PostgREST.SchemaCache.Identifiers (FieldName)
|
||||
|
||||
@@ -19,14 +19,11 @@ import qualified PostgREST.Query.Statements as Statements
|
||||
|
||||
|
||||
import PostgREST.ApiRequest (ApiRequest (..))
|
||||
import PostgREST.ApiRequest.Preferences (Preferences (..),
|
||||
shouldExplainCount)
|
||||
import PostgREST.ApiRequest.Preferences (Preferences (..), shouldExplainCount)
|
||||
import PostgREST.Auth.Types (AuthResult (..))
|
||||
import PostgREST.Config (AppConfig (..))
|
||||
import PostgREST.Plan (ActionPlan (..),
|
||||
CrudPlan (..),
|
||||
DbActionPlan (..),
|
||||
InspectPlan (..))
|
||||
import PostgREST.Plan (ActionPlan (..), CrudPlan (..),
|
||||
DbActionPlan (..), InspectPlan (..))
|
||||
import PostgREST.SchemaCache.Identifiers (QualifiedIdentifier (..))
|
||||
|
||||
import Protolude hiding (Handler)
|
||||
|
||||
@@ -18,12 +18,10 @@ import qualified Hasql.DynamicStatements.Snippet as SQL hiding (sql)
|
||||
|
||||
|
||||
import PostgREST.ApiRequest (ApiRequest (..))
|
||||
import PostgREST.ApiRequest.Preferences (PreferTimezone (..),
|
||||
Preferences (..))
|
||||
import PostgREST.ApiRequest.Preferences (PreferTimezone (..), Preferences (..))
|
||||
import PostgREST.Auth.Types (AuthResult (..))
|
||||
import PostgREST.Config (AppConfig (..))
|
||||
import PostgREST.Plan (CrudPlan (..),
|
||||
DbActionPlan (..))
|
||||
import PostgREST.Plan (CrudPlan (..), DbActionPlan (..))
|
||||
import PostgREST.Query.SqlFragment (escapeIdentList, fromQi,
|
||||
intercalateSnippet,
|
||||
setConfigWithConstantName,
|
||||
|
||||
@@ -29,8 +29,7 @@ import Data.Tree (Tree (..))
|
||||
|
||||
import PostgREST.ApiRequest.Preferences (PreferResolution (..))
|
||||
import PostgREST.SchemaCache.Identifiers (QualifiedIdentifier (..))
|
||||
import PostgREST.SchemaCache.Relationship (Cardinality (..),
|
||||
Junction (..),
|
||||
import PostgREST.SchemaCache.Relationship (Cardinality (..), Junction (..),
|
||||
Relationship (..))
|
||||
import PostgREST.SchemaCache.Routine (RoutineParam (..))
|
||||
|
||||
|
||||
@@ -60,20 +60,13 @@ import Control.Arrow ((***))
|
||||
import Data.Foldable (foldr1)
|
||||
import NeatInterpolation (trimming)
|
||||
|
||||
import PostgREST.ApiRequest.Types (AggregateFunction (..),
|
||||
Alias, Cast,
|
||||
FtsOperator (..),
|
||||
IsVal (..),
|
||||
JsonOperand (..),
|
||||
JsonOperation (..),
|
||||
JsonPath,
|
||||
LogicOperator (..),
|
||||
OpExpr (..),
|
||||
OpQuantifier (..),
|
||||
Operation (..),
|
||||
OrderDirection (..),
|
||||
OrderNulls (..),
|
||||
QuantOperator (..),
|
||||
import PostgREST.ApiRequest.Types (AggregateFunction (..), Alias, Cast,
|
||||
FtsOperator (..), IsVal (..),
|
||||
JsonOperand (..), JsonOperation (..),
|
||||
JsonPath, LogicOperator (..),
|
||||
OpExpr (..), OpQuantifier (..),
|
||||
Operation (..), OrderDirection (..),
|
||||
OrderNulls (..), QuantOperator (..),
|
||||
SimpleOperator (..))
|
||||
import PostgREST.MediaType (MTVndPlanFormat (..),
|
||||
MTVndPlanOption (..))
|
||||
@@ -85,16 +78,13 @@ import PostgREST.Plan.Types (CoercibleField (..),
|
||||
CoercibleSelectField (..),
|
||||
RelSelectField (..),
|
||||
SpreadSelectField (..),
|
||||
ToTsVector (..),
|
||||
unknownField)
|
||||
import PostgREST.RangeQuery (NonnegRange, allRange,
|
||||
rangeLimit, rangeOffset)
|
||||
import PostgREST.SchemaCache.Identifiers (FieldName,
|
||||
QualifiedIdentifier (..),
|
||||
RelIdentifier (..),
|
||||
escapeIdent, trimNullChars)
|
||||
import PostgREST.SchemaCache.Routine (MediaHandler (..),
|
||||
Routine (..),
|
||||
ToTsVector (..), unknownField)
|
||||
import PostgREST.RangeQuery (NonnegRange, allRange, rangeLimit,
|
||||
rangeOffset)
|
||||
import PostgREST.SchemaCache.Identifiers (FieldName, QualifiedIdentifier (..),
|
||||
RelIdentifier (..), escapeIdent,
|
||||
trimNullChars)
|
||||
import PostgREST.SchemaCache.Routine (MediaHandler (..), Routine (..),
|
||||
funcReturnsScalar,
|
||||
funcReturnsSetOfScalar,
|
||||
funcReturnsSingle,
|
||||
|
||||
@@ -13,8 +13,7 @@ module PostgREST.Query.Statements
|
||||
import qualified Hasql.DynamicStatements.Snippet as SQL
|
||||
|
||||
import PostgREST.ApiRequest.Preferences
|
||||
import PostgREST.MediaType (MTVndPlanFormat (..),
|
||||
MediaType (..))
|
||||
import PostgREST.MediaType (MTVndPlanFormat (..), MediaType (..))
|
||||
import PostgREST.Plan.CallPlan
|
||||
import PostgREST.Plan.MutatePlan as MTPlan
|
||||
import PostgREST.Plan.ReadPlan
|
||||
|
||||
@@ -27,26 +27,20 @@ import qualified PostgREST.Response.OpenAPI as OpenAPI
|
||||
import PostgREST.ApiRequest (ApiRequest (..))
|
||||
import PostgREST.ApiRequest.Preferences (PreferRepresentation (..),
|
||||
PreferResolution (..),
|
||||
Preferences (..),
|
||||
prefAppliedHeader,
|
||||
Preferences (..), prefAppliedHeader,
|
||||
shouldCount)
|
||||
import PostgREST.ApiRequest.QueryParams (QueryParams (..))
|
||||
import PostgREST.ApiRequest.Types (InvokeMethod (..),
|
||||
Mutation (..))
|
||||
import PostgREST.ApiRequest.Types (InvokeMethod (..), Mutation (..))
|
||||
import PostgREST.Config (AppConfig (..))
|
||||
import PostgREST.MainTx (DbResult (..),
|
||||
ResultSet (..))
|
||||
import PostgREST.MainTx (DbResult (..), ResultSet (..))
|
||||
import PostgREST.MediaType (MediaType (..))
|
||||
import PostgREST.Plan (CrudPlan (..),
|
||||
InfoPlan (..),
|
||||
import PostgREST.Plan (CrudPlan (..), InfoPlan (..),
|
||||
InspectPlan (..))
|
||||
import PostgREST.Plan.MutatePlan (MutatePlan (..))
|
||||
import PostgREST.Response.GucHeader (GucHeader, unwrapGucHeader)
|
||||
import PostgREST.SchemaCache (SchemaCache (..))
|
||||
import PostgREST.SchemaCache.Identifiers (QualifiedIdentifier (..),
|
||||
Schema)
|
||||
import PostgREST.SchemaCache.Routine (FuncVolatility (..),
|
||||
Routine (..))
|
||||
import PostgREST.SchemaCache.Identifiers (QualifiedIdentifier (..), Schema)
|
||||
import PostgREST.SchemaCache.Routine (FuncVolatility (..), Routine (..))
|
||||
import PostgREST.SchemaCache.Table (Table (..))
|
||||
|
||||
import qualified PostgREST.SchemaCache.Routine as Routine
|
||||
|
||||
@@ -29,14 +29,11 @@ import PostgREST.MediaType
|
||||
import PostgREST.Network (escapeHostName)
|
||||
import PostgREST.SchemaCache (SchemaCache (..))
|
||||
import PostgREST.SchemaCache.Identifiers (QualifiedIdentifier (..))
|
||||
import PostgREST.SchemaCache.Relationship (Cardinality (..),
|
||||
Relationship (..),
|
||||
import PostgREST.SchemaCache.Relationship (Cardinality (..), Relationship (..),
|
||||
RelationshipsMap)
|
||||
import PostgREST.SchemaCache.Routine (FuncVolatility (..),
|
||||
Routine (..),
|
||||
import PostgREST.SchemaCache.Routine (FuncVolatility (..), Routine (..),
|
||||
RoutineParam (..))
|
||||
import PostgREST.SchemaCache.Table (Column (..), Table (..),
|
||||
TablesMap,
|
||||
import PostgREST.SchemaCache.Table (Column (..), Table (..), TablesMap,
|
||||
tableColumnsList)
|
||||
|
||||
import Protolude hiding (Proxy, get)
|
||||
|
||||
@@ -44,29 +44,22 @@ import qualified Hasql.Transaction as SQL
|
||||
import Data.Functor.Contravariant ((>$<))
|
||||
import NeatInterpolation (trimming)
|
||||
|
||||
import PostgREST.Config (AppConfig (..),
|
||||
LogLevel (..))
|
||||
import PostgREST.Config.Database (TimezoneNames,
|
||||
toIsolationLevel)
|
||||
import PostgREST.Config (AppConfig (..), LogLevel (..))
|
||||
import PostgREST.Config.Database (TimezoneNames, toIsolationLevel)
|
||||
import PostgREST.SchemaCache.Identifiers (FieldName,
|
||||
QualifiedIdentifier (..),
|
||||
RelIdentifier (..),
|
||||
Schema, escapeIdent,
|
||||
isAnyElement)
|
||||
import PostgREST.SchemaCache.Relationship (Cardinality (..),
|
||||
Junction (..),
|
||||
RelIdentifier (..), Schema,
|
||||
escapeIdent, isAnyElement)
|
||||
import PostgREST.SchemaCache.Relationship (Cardinality (..), Junction (..),
|
||||
Relationship (..),
|
||||
RelationshipsMap)
|
||||
import PostgREST.SchemaCache.Representations (DataRepresentation (..),
|
||||
RepresentationsMap)
|
||||
import PostgREST.SchemaCache.Routine (FuncVolatility (..),
|
||||
MediaHandler (..),
|
||||
MediaHandlerMap,
|
||||
PgType (..),
|
||||
RetType (..),
|
||||
Routine (..),
|
||||
RoutineMap,
|
||||
RoutineParam (..))
|
||||
MediaHandlerMap, PgType (..),
|
||||
RetType (..), Routine (..),
|
||||
RoutineMap, RoutineParam (..))
|
||||
import PostgREST.SchemaCache.Table (Column (..), ColumnMap,
|
||||
Table (..), TablesMap)
|
||||
|
||||
|
||||
@@ -12,8 +12,8 @@ module PostgREST.SchemaCache.Relationship
|
||||
import qualified Data.Aeson as JSON
|
||||
import qualified Data.HashMap.Strict as HM
|
||||
|
||||
import PostgREST.SchemaCache.Identifiers (FieldName,
|
||||
QualifiedIdentifier, Schema)
|
||||
import PostgREST.SchemaCache.Identifiers (FieldName, QualifiedIdentifier,
|
||||
Schema)
|
||||
|
||||
import Protolude
|
||||
|
||||
|
||||
@@ -28,8 +28,7 @@ import qualified Hasql.Transaction.Sessions as SQL
|
||||
import qualified PostgREST.MediaType as MediaType
|
||||
|
||||
import PostgREST.SchemaCache.Identifiers (QualifiedIdentifier (..),
|
||||
RelIdentifier (..), Schema,
|
||||
TableName)
|
||||
RelIdentifier (..), Schema, TableName)
|
||||
|
||||
import Protolude
|
||||
|
||||
|
||||
@@ -14,8 +14,7 @@ import qualified Data.Aeson as JSON
|
||||
import qualified Data.HashMap.Strict as HM
|
||||
import qualified Data.HashMap.Strict.InsOrd as HMI
|
||||
|
||||
import PostgREST.SchemaCache.Identifiers (FieldName,
|
||||
QualifiedIdentifier (..),
|
||||
import PostgREST.SchemaCache.Identifiers (FieldName, QualifiedIdentifier (..),
|
||||
Schema, TableName)
|
||||
|
||||
import Protolude
|
||||
|
||||
@@ -23,8 +23,7 @@ import qualified Jose.Jws as JWT
|
||||
import qualified Jose.Jwt as JWT
|
||||
import Network.HTTP.Types
|
||||
import qualified PostgREST.AppState as AppState
|
||||
import PostgREST.Config (AppConfig (..),
|
||||
LogLevel (..),
|
||||
import PostgREST.Config (AppConfig (..), LogLevel (..),
|
||||
OpenAPIMode (..),
|
||||
Verbosity (..),
|
||||
defaultRoleJSPathKey,
|
||||
|
||||
@@ -12,8 +12,7 @@ import Network.Wai (Application)
|
||||
import ObsHelper
|
||||
import qualified PostgREST.AppState as AppState
|
||||
import PostgREST.Config (AppConfig (configDbSchemas))
|
||||
import PostgREST.Metrics (ConnStats (..),
|
||||
MetricsState (..),
|
||||
import PostgREST.Metrics (ConnStats (..), MetricsState (..),
|
||||
connectionCounts)
|
||||
import PostgREST.Observation
|
||||
import Prometheus (getCounter, getVectorWith)
|
||||
|
||||
+1
-2
@@ -9,8 +9,7 @@ import Data.Function (id)
|
||||
import Test.Hspec
|
||||
|
||||
import PostgREST.App (postgrest)
|
||||
import PostgREST.Config (AppConfig (..),
|
||||
toConnectionSettings)
|
||||
import PostgREST.Config (AppConfig (..), toConnectionSettings)
|
||||
import PostgREST.Config.Database (queryPgVersion)
|
||||
import PostgREST.SchemaCache (querySchemaCache)
|
||||
import Protolude hiding (toList, toS)
|
||||
|
||||
@@ -24,12 +24,9 @@ import Network.Wai.Test (SResponse (simpleBody, simpleHeaders, simpleStatus
|
||||
import System.IO.Unsafe (unsafePerformIO)
|
||||
import Text.Regex.TDFA ((=~))
|
||||
|
||||
import PostgREST.Config (AppConfig (..),
|
||||
LogLevel (..),
|
||||
OpenAPIMode (..),
|
||||
Verbosity (..),
|
||||
defaultRoleJSPathKey,
|
||||
parseSecret)
|
||||
import PostgREST.Config (AppConfig (..), LogLevel (..),
|
||||
OpenAPIMode (..), Verbosity (..),
|
||||
defaultRoleJSPathKey, parseSecret)
|
||||
import PostgREST.SchemaCache.Identifiers (QualifiedIdentifier (..))
|
||||
|
||||
import Data.Aeson.Lens
|
||||
|
||||
Reference in New Issue
Block a user