persistent-2.17.0.0: Type-safe, multi-backend data serialization.
Safe HaskellNone
LanguageHaskell2010

Database.Persist.Quasi.PersistSettings

Synopsis

Documentation

parserWarningMessage :: ParserWarning -> String Source #

Uses errorBundlePretty to render a parser warning.

Since: 2.16.0.0

Getters and Setters

getPsToDBName :: PersistSettings -> Text -> Text Source #

Retrieve the function in the PersistSettings that modifies the names into database names.

Since: 2.13.0.0

setPsToDBName :: (Text -> Text) -> PersistSettings -> PersistSettings Source #

Set the name modification function that translates the QuasiQuoted names for use in the database.

Since: 2.13.0.0

setPsToFKName :: (EntityNameHS -> ConstraintNameHS -> Text) -> PersistSettings -> PersistSettings Source #

Set a custom function used to create the constraint name for a foreign key.

Since: 2.13.0.0

setPsUseSnakeCaseForeignKeys :: PersistSettings -> PersistSettings Source #

A preset configuration function that puts an underscore between the entity name and the constraint name when creating a foreign key constraint name

Since: 2.14.2.0

setPsUseSnakeCaseForiegnKeys :: PersistSettings -> PersistSettings Source #

Deprecated: use the correctly spelled, equivalent, setPsUseSnakeCaseForeignKeys instead

Equivalent to setPsUseSnakeCaseForeignKeys, but misspelled.

Since: 2.13.0.0

getPsStrictFields :: PersistSettings -> Bool Source #

Retrieve whether or not the PersistSettings will generate code with strict fields.

Since: 2.13.0.0

setPsStrictFields :: Bool -> PersistSettings -> PersistSettings Source #

Set whether or not the PersistSettings will make fields strict.

Since: 2.13.0.0

getPsIdName :: PersistSettings -> Text Source #

Retrieve the default name of the id column.

Since: 2.13.0.0

setPsIdName :: Text -> PersistSettings -> PersistSettings Source #

Set the default name of the id column.

Since: 2.13.0.0

getPsTabErrorLevel :: PersistSettings -> Maybe ParserErrorLevel Source #

Retrieve the severity of the error generated when the parser encounters a tab. If it is Nothing, tabs are permitted in entity definitions.

Since: 2.16.0.0

setPsTabErrorLevel :: Maybe ParserErrorLevel -> PersistSettings -> PersistSettings Source #

Set the severity of the error generated when the parser encounters a tab. If set to Nothing, tabs are permitted in entity definitions.

Since: 2.16.0.0