-- |
-- Definitions for schema building configuration.
module Hasura.RQL.Types.Schema.Options
  ( SchemaOptions (..),
    StringifyNumbers (..),
    DangerouslyCollapseBooleans (..),
    InferFunctionPermissions (..),
    RemoteSchemaPermissions (..),
    OptimizePermissionFilters (..),
    IncludeAggregationPredicates (..),
    IncludeStreamFields (..),
    IncludeUpdateManyFields (..),
    BigQueryStringNumericInput (..),
    IncludeGroupByAggregateFields (..),
    UsePostgresArrays (..),
  )
where

import Data.Aeson (FromJSON (..), ToJSON (..), Value (..), withBool)
import Hasura.Prelude

-- | The record of options required to build the schema. This includes options
-- that can be enabled with 'Hasura.Server.Types.ExperimentalFeature' flags.
data SchemaOptions = SchemaOptions
  { SchemaOptions -> StringifyNumbers
soStringifyNumbers :: StringifyNumbers,
    SchemaOptions -> DangerouslyCollapseBooleans
soDangerousBooleanCollapse :: DangerouslyCollapseBooleans,
    SchemaOptions -> InferFunctionPermissions
soInferFunctionPermissions :: InferFunctionPermissions,
    SchemaOptions -> OptimizePermissionFilters
soOptimizePermissionFilters :: OptimizePermissionFilters,
    SchemaOptions -> IncludeUpdateManyFields
soIncludeUpdateManyFields :: IncludeUpdateManyFields,
    SchemaOptions -> IncludeAggregationPredicates
soIncludeAggregationPredicates :: IncludeAggregationPredicates,
    SchemaOptions -> IncludeStreamFields
soIncludeStreamFields :: IncludeStreamFields,
    SchemaOptions -> BigQueryStringNumericInput
soBigQueryStringNumericInput :: BigQueryStringNumericInput,
    SchemaOptions -> IncludeGroupByAggregateFields
soIncludeGroupByAggregateFields :: IncludeGroupByAggregateFields,
    SchemaOptions -> UsePostgresArrays
soPostgresArrays :: UsePostgresArrays
  }

-- | Should we represent numbers in our responses as numbers, or strings?
-- Some backends can return numbers that exceed the bounds of JSON's own
-- number type. In these cases, we can use stringified versions of these
-- numbers to avoid this problem.
data StringifyNumbers
  = StringifyNumbers
  | Don'tStringifyNumbers
  deriving (StringifyNumbers -> StringifyNumbers -> Bool
(StringifyNumbers -> StringifyNumbers -> Bool)
-> (StringifyNumbers -> StringifyNumbers -> Bool)
-> Eq StringifyNumbers
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: StringifyNumbers -> StringifyNumbers -> Bool
== :: StringifyNumbers -> StringifyNumbers -> Bool
$c/= :: StringifyNumbers -> StringifyNumbers -> Bool
/= :: StringifyNumbers -> StringifyNumbers -> Bool
Eq, Int -> StringifyNumbers -> ShowS
[StringifyNumbers] -> ShowS
StringifyNumbers -> String
(Int -> StringifyNumbers -> ShowS)
-> (StringifyNumbers -> String)
-> ([StringifyNumbers] -> ShowS)
-> Show StringifyNumbers
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> StringifyNumbers -> ShowS
showsPrec :: Int -> StringifyNumbers -> ShowS
$cshow :: StringifyNumbers -> String
show :: StringifyNumbers -> String
$cshowList :: [StringifyNumbers] -> ShowS
showList :: [StringifyNumbers] -> ShowS
Show)

-- | Should we include `TABLE_updates` fields in schemas
-- This is a toggle so that users can opt-in, and so that we can rename
-- any tables that this may conflict with if needed
data IncludeUpdateManyFields
  = IncludeUpdateManyFields
  | Don'tIncludeUpdateManyFields
  deriving (IncludeUpdateManyFields -> IncludeUpdateManyFields -> Bool
(IncludeUpdateManyFields -> IncludeUpdateManyFields -> Bool)
-> (IncludeUpdateManyFields -> IncludeUpdateManyFields -> Bool)
-> Eq IncludeUpdateManyFields
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: IncludeUpdateManyFields -> IncludeUpdateManyFields -> Bool
== :: IncludeUpdateManyFields -> IncludeUpdateManyFields -> Bool
$c/= :: IncludeUpdateManyFields -> IncludeUpdateManyFields -> Bool
/= :: IncludeUpdateManyFields -> IncludeUpdateManyFields -> Bool
Eq, Int -> IncludeUpdateManyFields -> ShowS
[IncludeUpdateManyFields] -> ShowS
IncludeUpdateManyFields -> String
(Int -> IncludeUpdateManyFields -> ShowS)
-> (IncludeUpdateManyFields -> String)
-> ([IncludeUpdateManyFields] -> ShowS)
-> Show IncludeUpdateManyFields
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> IncludeUpdateManyFields -> ShowS
showsPrec :: Int -> IncludeUpdateManyFields -> ShowS
$cshow :: IncludeUpdateManyFields -> String
show :: IncludeUpdateManyFields -> String
$cshowList :: [IncludeUpdateManyFields] -> ShowS
showList :: [IncludeUpdateManyFields] -> ShowS
Show)

-- | Should we include `TABLE_stream` fields in schemas
-- This is a toggle so that users can opt-in, and so that we can rename
-- any tables that this may conflict with if needed
data IncludeStreamFields
  = IncludeStreamFields
  | Don'tIncludeStreamFields
  deriving (IncludeStreamFields -> IncludeStreamFields -> Bool
(IncludeStreamFields -> IncludeStreamFields -> Bool)
-> (IncludeStreamFields -> IncludeStreamFields -> Bool)
-> Eq IncludeStreamFields
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: IncludeStreamFields -> IncludeStreamFields -> Bool
== :: IncludeStreamFields -> IncludeStreamFields -> Bool
$c/= :: IncludeStreamFields -> IncludeStreamFields -> Bool
/= :: IncludeStreamFields -> IncludeStreamFields -> Bool
Eq, Int -> IncludeStreamFields -> ShowS
[IncludeStreamFields] -> ShowS
IncludeStreamFields -> String
(Int -> IncludeStreamFields -> ShowS)
-> (IncludeStreamFields -> String)
-> ([IncludeStreamFields] -> ShowS)
-> Show IncludeStreamFields
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> IncludeStreamFields -> ShowS
showsPrec :: Int -> IncludeStreamFields -> ShowS
$cshow :: IncludeStreamFields -> String
show :: IncludeStreamFields -> String
$cshowList :: [IncludeStreamFields] -> ShowS
showList :: [IncludeStreamFields] -> ShowS
Show)

-- | Should we include aggregation functions in where clauses?
-- Because this has the potential to cause naming conflicts in graphql schema
-- types, this flag allows users to toggle the feature off if it an upgrade breaks
-- their setup.
data IncludeAggregationPredicates
  = IncludeAggregationPredicates
  | Don'tIncludeAggregationPredicates

-- | Should Boolean fields be collapsed to 'True' when a null value is
-- given? This was the behaviour of Hasura V1, and is now discouraged.
data DangerouslyCollapseBooleans
  = DangerouslyCollapseBooleans
  | Don'tDangerouslyCollapseBooleans
  deriving (DangerouslyCollapseBooleans -> DangerouslyCollapseBooleans -> Bool
(DangerouslyCollapseBooleans
 -> DangerouslyCollapseBooleans -> Bool)
-> (DangerouslyCollapseBooleans
    -> DangerouslyCollapseBooleans -> Bool)
-> Eq DangerouslyCollapseBooleans
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DangerouslyCollapseBooleans -> DangerouslyCollapseBooleans -> Bool
== :: DangerouslyCollapseBooleans -> DangerouslyCollapseBooleans -> Bool
$c/= :: DangerouslyCollapseBooleans -> DangerouslyCollapseBooleans -> Bool
/= :: DangerouslyCollapseBooleans -> DangerouslyCollapseBooleans -> Bool
Eq, Int -> DangerouslyCollapseBooleans -> ShowS
[DangerouslyCollapseBooleans] -> ShowS
DangerouslyCollapseBooleans -> String
(Int -> DangerouslyCollapseBooleans -> ShowS)
-> (DangerouslyCollapseBooleans -> String)
-> ([DangerouslyCollapseBooleans] -> ShowS)
-> Show DangerouslyCollapseBooleans
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DangerouslyCollapseBooleans -> ShowS
showsPrec :: Int -> DangerouslyCollapseBooleans -> ShowS
$cshow :: DangerouslyCollapseBooleans -> String
show :: DangerouslyCollapseBooleans -> String
$cshowList :: [DangerouslyCollapseBooleans] -> ShowS
showList :: [DangerouslyCollapseBooleans] -> ShowS
Show)

instance FromJSON DangerouslyCollapseBooleans where
  parseJSON :: Value -> Parser DangerouslyCollapseBooleans
parseJSON =
    String
-> (Bool -> Parser DangerouslyCollapseBooleans)
-> Value
-> Parser DangerouslyCollapseBooleans
forall a. String -> (Bool -> Parser a) -> Value -> Parser a
withBool String
"DangerouslyCollapseBooleans"
      ((Bool -> Parser DangerouslyCollapseBooleans)
 -> Value -> Parser DangerouslyCollapseBooleans)
-> (Bool -> Parser DangerouslyCollapseBooleans)
-> Value
-> Parser DangerouslyCollapseBooleans
forall a b. (a -> b) -> a -> b
$ DangerouslyCollapseBooleans -> Parser DangerouslyCollapseBooleans
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure
      (DangerouslyCollapseBooleans -> Parser DangerouslyCollapseBooleans)
-> (Bool -> DangerouslyCollapseBooleans)
-> Bool
-> Parser DangerouslyCollapseBooleans
forall b c a. (b -> c) -> (a -> b) -> a -> c
. \case
        Bool
True -> DangerouslyCollapseBooleans
DangerouslyCollapseBooleans
        Bool
False -> DangerouslyCollapseBooleans
Don'tDangerouslyCollapseBooleans

instance ToJSON DangerouslyCollapseBooleans where
  toJSON :: DangerouslyCollapseBooleans -> Value
toJSON = \case
    DangerouslyCollapseBooleans
DangerouslyCollapseBooleans -> Bool -> Value
Bool Bool
True
    DangerouslyCollapseBooleans
Don'tDangerouslyCollapseBooleans -> Bool -> Value
Bool Bool
False

-- | Should we infer function permissions? If this flag is set to
-- 'InferFunctionPermissions', we may fail to build expression parsers
-- in 'buildQueryAndSubscriptionFields' for users with unrecognised roles.
data InferFunctionPermissions
  = InferFunctionPermissions
  | Don'tInferFunctionPermissions
  deriving (InferFunctionPermissions -> InferFunctionPermissions -> Bool
(InferFunctionPermissions -> InferFunctionPermissions -> Bool)
-> (InferFunctionPermissions -> InferFunctionPermissions -> Bool)
-> Eq InferFunctionPermissions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: InferFunctionPermissions -> InferFunctionPermissions -> Bool
== :: InferFunctionPermissions -> InferFunctionPermissions -> Bool
$c/= :: InferFunctionPermissions -> InferFunctionPermissions -> Bool
/= :: InferFunctionPermissions -> InferFunctionPermissions -> Bool
Eq, Int -> InferFunctionPermissions -> ShowS
[InferFunctionPermissions] -> ShowS
InferFunctionPermissions -> String
(Int -> InferFunctionPermissions -> ShowS)
-> (InferFunctionPermissions -> String)
-> ([InferFunctionPermissions] -> ShowS)
-> Show InferFunctionPermissions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> InferFunctionPermissions -> ShowS
showsPrec :: Int -> InferFunctionPermissions -> ShowS
$cshow :: InferFunctionPermissions -> String
show :: InferFunctionPermissions -> String
$cshowList :: [InferFunctionPermissions] -> ShowS
showList :: [InferFunctionPermissions] -> ShowS
Show)

instance FromJSON InferFunctionPermissions where
  parseJSON :: Value -> Parser InferFunctionPermissions
parseJSON =
    String
-> (Bool -> Parser InferFunctionPermissions)
-> Value
-> Parser InferFunctionPermissions
forall a. String -> (Bool -> Parser a) -> Value -> Parser a
withBool String
"InferFunctionPermissions"
      ((Bool -> Parser InferFunctionPermissions)
 -> Value -> Parser InferFunctionPermissions)
-> (Bool -> Parser InferFunctionPermissions)
-> Value
-> Parser InferFunctionPermissions
forall a b. (a -> b) -> a -> b
$ InferFunctionPermissions -> Parser InferFunctionPermissions
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure
      (InferFunctionPermissions -> Parser InferFunctionPermissions)
-> (Bool -> InferFunctionPermissions)
-> Bool
-> Parser InferFunctionPermissions
forall b c a. (b -> c) -> (a -> b) -> a -> c
. \case
        Bool
True -> InferFunctionPermissions
InferFunctionPermissions
        Bool
False -> InferFunctionPermissions
Don'tInferFunctionPermissions

instance ToJSON InferFunctionPermissions where
  toJSON :: InferFunctionPermissions -> Value
toJSON = \case
    InferFunctionPermissions
InferFunctionPermissions -> Bool -> Value
Bool Bool
True
    InferFunctionPermissions
Don'tInferFunctionPermissions -> Bool -> Value
Bool Bool
False

-- | Should we enable remote schema permissions? If so, these permissions will
-- influence 'Hasura.GraphQL.Schema.buildGQLContext'.
data RemoteSchemaPermissions
  = EnableRemoteSchemaPermissions
  | DisableRemoteSchemaPermissions
  deriving (RemoteSchemaPermissions -> RemoteSchemaPermissions -> Bool
(RemoteSchemaPermissions -> RemoteSchemaPermissions -> Bool)
-> (RemoteSchemaPermissions -> RemoteSchemaPermissions -> Bool)
-> Eq RemoteSchemaPermissions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RemoteSchemaPermissions -> RemoteSchemaPermissions -> Bool
== :: RemoteSchemaPermissions -> RemoteSchemaPermissions -> Bool
$c/= :: RemoteSchemaPermissions -> RemoteSchemaPermissions -> Bool
/= :: RemoteSchemaPermissions -> RemoteSchemaPermissions -> Bool
Eq, Int -> RemoteSchemaPermissions -> ShowS
[RemoteSchemaPermissions] -> ShowS
RemoteSchemaPermissions -> String
(Int -> RemoteSchemaPermissions -> ShowS)
-> (RemoteSchemaPermissions -> String)
-> ([RemoteSchemaPermissions] -> ShowS)
-> Show RemoteSchemaPermissions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RemoteSchemaPermissions -> ShowS
showsPrec :: Int -> RemoteSchemaPermissions -> ShowS
$cshow :: RemoteSchemaPermissions -> String
show :: RemoteSchemaPermissions -> String
$cshowList :: [RemoteSchemaPermissions] -> ShowS
showList :: [RemoteSchemaPermissions] -> ShowS
Show)

instance FromJSON RemoteSchemaPermissions where
  parseJSON :: Value -> Parser RemoteSchemaPermissions
parseJSON =
    String
-> (Bool -> Parser RemoteSchemaPermissions)
-> Value
-> Parser RemoteSchemaPermissions
forall a. String -> (Bool -> Parser a) -> Value -> Parser a
withBool String
"RemoteSchemaPermissions"
      ((Bool -> Parser RemoteSchemaPermissions)
 -> Value -> Parser RemoteSchemaPermissions)
-> (Bool -> Parser RemoteSchemaPermissions)
-> Value
-> Parser RemoteSchemaPermissions
forall a b. (a -> b) -> a -> b
$ RemoteSchemaPermissions -> Parser RemoteSchemaPermissions
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure
      (RemoteSchemaPermissions -> Parser RemoteSchemaPermissions)
-> (Bool -> RemoteSchemaPermissions)
-> Bool
-> Parser RemoteSchemaPermissions
forall b c a. (b -> c) -> (a -> b) -> a -> c
. \case
        Bool
True -> RemoteSchemaPermissions
EnableRemoteSchemaPermissions
        Bool
False -> RemoteSchemaPermissions
DisableRemoteSchemaPermissions

instance ToJSON RemoteSchemaPermissions where
  toJSON :: RemoteSchemaPermissions -> Value
toJSON = \case
    RemoteSchemaPermissions
EnableRemoteSchemaPermissions -> Bool -> Value
Bool Bool
True
    RemoteSchemaPermissions
DisableRemoteSchemaPermissions -> Bool -> Value
Bool Bool
False

-- | Should we attempt to deduplicate permission filters? This flag is used in
-- 'Hasura.GraphQL.Schema.Select.relationshipField' to determine whether
-- certain row-level permission filters can be dropped in certain cases.
data OptimizePermissionFilters
  = OptimizePermissionFilters
  | Don'tOptimizePermissionFilters
  deriving (OptimizePermissionFilters -> OptimizePermissionFilters -> Bool
(OptimizePermissionFilters -> OptimizePermissionFilters -> Bool)
-> (OptimizePermissionFilters -> OptimizePermissionFilters -> Bool)
-> Eq OptimizePermissionFilters
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: OptimizePermissionFilters -> OptimizePermissionFilters -> Bool
== :: OptimizePermissionFilters -> OptimizePermissionFilters -> Bool
$c/= :: OptimizePermissionFilters -> OptimizePermissionFilters -> Bool
/= :: OptimizePermissionFilters -> OptimizePermissionFilters -> Bool
Eq, Int -> OptimizePermissionFilters -> ShowS
[OptimizePermissionFilters] -> ShowS
OptimizePermissionFilters -> String
(Int -> OptimizePermissionFilters -> ShowS)
-> (OptimizePermissionFilters -> String)
-> ([OptimizePermissionFilters] -> ShowS)
-> Show OptimizePermissionFilters
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> OptimizePermissionFilters -> ShowS
showsPrec :: Int -> OptimizePermissionFilters -> ShowS
$cshow :: OptimizePermissionFilters -> String
show :: OptimizePermissionFilters -> String
$cshowList :: [OptimizePermissionFilters] -> ShowS
showList :: [OptimizePermissionFilters] -> ShowS
Show)

-- | Should we enable string-accepting scalar parsers for BigQuery sources
data BigQueryStringNumericInput
  = EnableBigQueryStringNumericInput
  | DisableBigQueryStringNumericInput
  deriving (BigQueryStringNumericInput -> BigQueryStringNumericInput -> Bool
(BigQueryStringNumericInput -> BigQueryStringNumericInput -> Bool)
-> (BigQueryStringNumericInput
    -> BigQueryStringNumericInput -> Bool)
-> Eq BigQueryStringNumericInput
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: BigQueryStringNumericInput -> BigQueryStringNumericInput -> Bool
== :: BigQueryStringNumericInput -> BigQueryStringNumericInput -> Bool
$c/= :: BigQueryStringNumericInput -> BigQueryStringNumericInput -> Bool
/= :: BigQueryStringNumericInput -> BigQueryStringNumericInput -> Bool
Eq, Int -> BigQueryStringNumericInput -> ShowS
[BigQueryStringNumericInput] -> ShowS
BigQueryStringNumericInput -> String
(Int -> BigQueryStringNumericInput -> ShowS)
-> (BigQueryStringNumericInput -> String)
-> ([BigQueryStringNumericInput] -> ShowS)
-> Show BigQueryStringNumericInput
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> BigQueryStringNumericInput -> ShowS
showsPrec :: Int -> BigQueryStringNumericInput -> ShowS
$cshow :: BigQueryStringNumericInput -> String
show :: BigQueryStringNumericInput -> String
$cshowList :: [BigQueryStringNumericInput] -> ShowS
showList :: [BigQueryStringNumericInput] -> ShowS
Show)

data IncludeGroupByAggregateFields
  = IncludeGroupByAggregateFields
  | ExcludeGroupByAggregateFields
  deriving (IncludeGroupByAggregateFields
-> IncludeGroupByAggregateFields -> Bool
(IncludeGroupByAggregateFields
 -> IncludeGroupByAggregateFields -> Bool)
-> (IncludeGroupByAggregateFields
    -> IncludeGroupByAggregateFields -> Bool)
-> Eq IncludeGroupByAggregateFields
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: IncludeGroupByAggregateFields
-> IncludeGroupByAggregateFields -> Bool
== :: IncludeGroupByAggregateFields
-> IncludeGroupByAggregateFields -> Bool
$c/= :: IncludeGroupByAggregateFields
-> IncludeGroupByAggregateFields -> Bool
/= :: IncludeGroupByAggregateFields
-> IncludeGroupByAggregateFields -> Bool
Eq, Int -> IncludeGroupByAggregateFields -> ShowS
[IncludeGroupByAggregateFields] -> ShowS
IncludeGroupByAggregateFields -> String
(Int -> IncludeGroupByAggregateFields -> ShowS)
-> (IncludeGroupByAggregateFields -> String)
-> ([IncludeGroupByAggregateFields] -> ShowS)
-> Show IncludeGroupByAggregateFields
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> IncludeGroupByAggregateFields -> ShowS
showsPrec :: Int -> IncludeGroupByAggregateFields -> ShowS
$cshow :: IncludeGroupByAggregateFields -> String
show :: IncludeGroupByAggregateFields -> String
$cshowList :: [IncludeGroupByAggregateFields] -> ShowS
showList :: [IncludeGroupByAggregateFields] -> ShowS
Show)

-- | if we use Postgres arrays then an array of `text` becomes `[String!]`,
-- however we want users to have the option to make it output `_text` like it
-- did before for compatibility.
data UsePostgresArrays
  = UsePostgresArrays
  | DontUsePostgresArrays
  deriving (UsePostgresArrays -> UsePostgresArrays -> Bool
(UsePostgresArrays -> UsePostgresArrays -> Bool)
-> (UsePostgresArrays -> UsePostgresArrays -> Bool)
-> Eq UsePostgresArrays
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: UsePostgresArrays -> UsePostgresArrays -> Bool
== :: UsePostgresArrays -> UsePostgresArrays -> Bool
$c/= :: UsePostgresArrays -> UsePostgresArrays -> Bool
/= :: UsePostgresArrays -> UsePostgresArrays -> Bool
Eq, Int -> UsePostgresArrays -> ShowS
[UsePostgresArrays] -> ShowS
UsePostgresArrays -> String
(Int -> UsePostgresArrays -> ShowS)
-> (UsePostgresArrays -> String)
-> ([UsePostgresArrays] -> ShowS)
-> Show UsePostgresArrays
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> UsePostgresArrays -> ShowS
showsPrec :: Int -> UsePostgresArrays -> ShowS
$cshow :: UsePostgresArrays -> String
show :: UsePostgresArrays -> String
$cshowList :: [UsePostgresArrays] -> ShowS
showList :: [UsePostgresArrays] -> ShowS
Show)