persistent-2.17.1.0: Type-safe, multi-backend data serialization.

Safe Haskell | None
Language | Haskell2010

Database.Persist.Sql

Contents

- `RawSql` and `PersistFieldSql`
- Running actions
- Migrations
- `persistent` combinators
- The Escape Hatch
- SQL helpers
- Transactions
- Other utilities
- Internal

Description

This module is the primary entry point if you're working with `persistent` on a SQL database.

# Getting Started

First, you'll want to define your database entities. You can do that with "Database.Persist.Quasi."

Then, you'll use the operations

Synopsis

- class PersistField a => PersistFieldSql a where
  - sqlType :: Proxy a -> SqlType
- class RawSql a where
  - rawSqlCols :: (Text -> Text) -> a -> (Int, [Text])
  - rawSqlColCountReason :: a -> String
  - rawSqlProcessRow :: [PersistValue] -> Either Text a
- newtype EntityWithPrefix (prefix :: Symbol) record = EntityWithPrefix {
  - unEntityWithPrefix :: Entity record
  }
- unPrefix :: forall (prefix :: Symbol) record. EntityWithPrefix prefix record -> Entity record
- runSqlPool :: forall backend m a. (MonadUnliftIO m, BackendCompatible SqlBackend backend) => ReaderT backend m a -> Pool backend -> m a
- runSqlConn :: forall backend m a. (MonadUnliftIO m, BackendCompatible SqlBackend backend) => ReaderT backend m a -> backend -> m a
- runSqlPoolWithIsolation :: forall backend m a. (MonadUnliftIO m, BackendCompatible SqlBackend backend) => ReaderT backend m a -> Pool backend -> IsolationLevel -> m a
- runSqlPoolNoTransaction :: forall backend m a. (MonadUnliftIO m, BackendCompatible SqlBackend backend) => ReaderT backend m a -> Pool backend -> Maybe IsolationLevel -> m a
- runSqlPoolWithHooks :: forall backend m a before after onException. (MonadUnliftIO m, BackendCompatible SqlBackend backend) => ReaderT backend m a -> Pool backend -> Maybe IsolationLevel -> (backend -> m before) -> (backend -> m after) -> (backend -> SomeException -> m onException) -> m a
- runSqlPoolWithExtensibleHooks :: forall backend m a. (MonadUnliftIO m, BackendCompatible SqlBackend backend) => ReaderT backend m a -> Pool backend -> Maybe IsolationLevel -> SqlPoolHooks m backend -> m a
- acquireSqlConn :: (MonadReader backend m, BackendCompatible SqlBackend backend) => m (Acquire backend)
- acquireSqlConnWithIsolation :: (MonadReader backend m, BackendCompatible SqlBackend backend) => IsolationLevel -> m (Acquire backend)
- runSqlConnWithIsolation :: forall backend m a. (MonadUnliftIO m, BackendCompatible SqlBackend backend) => ReaderT backend m a -> backend -> IsolationLevel -> m a
- runSqlPersistM :: BackendCompatible SqlBackend backend => ReaderT backend (NoLoggingT (ResourceT IO)) a -> backend -> IO a
- runSqlPersistMPool :: BackendCompatible SqlBackend backend => ReaderT backend (NoLoggingT (ResourceT IO)) a -> Pool backend -> IO a
- liftSqlPersistMPool :: forall backend m a. (MonadIO m, BackendCompatible SqlBackend backend) => ReaderT backend (NoLoggingT (ResourceT IO)) a -> Pool backend -> m a
- withSqlPool :: forall backend m a. (MonadLoggerIO m, MonadUnliftIO m, BackendCompatible SqlBackend backend) => (LogFunc -> IO backend) -> Int -> (Pool backend -> m a) -> m a
- withSqlPoolWithConfig :: forall backend m a. (MonadLoggerIO m, MonadUnliftIO m, BackendCompatible SqlBackend backend) => (LogFunc -> IO backend) -> ConnectionPoolConfig -> (Pool backend -> m a) -> m a
- createSqlPoolWithConfig :: (MonadLoggerIO m, MonadUnliftIO m, BackendCompatible SqlBackend backend) => (LogFunc -> IO backend) -> ConnectionPoolConfig -> m (Pool backend)
- createSqlPool :: forall backend m. (MonadLoggerIO m, MonadUnliftIO m, BackendCompatible SqlBackend backend) => (LogFunc -> IO backend) -> Int -> m (Pool backend)
- close' :: BackendCompatible SqlBackend backend => backend -> IO ()
- withSqlConn :: forall backend m a. (MonadUnliftIO m, MonadLoggerIO m, BackendCompatible SqlBackend backend) => (LogFunc -> IO backend) -> (backend -> m a) -> m a
- module Database.Persist.Sql.Migration
- module Database.Persist
- data family BackendKey backend
- data family BackendKey backend
- withRawQuery :: forall (m :: Type -> Type) a. MonadIO m => Text -> [PersistValue] -> ConduitM [PersistValue] Void IO a -> ReaderT SqlBackend m a
- toSqlKey :: ToBackendKey SqlBackend record => Int64 -> Key record
- fromSqlKey :: ToBackendKey SqlBackend record => Key record -> Int64
- getFieldName :: forall record typ (m :: Type -> Type) backend. (PersistEntity record, PersistEntityBackend record ~ SqlBackend, BackendCompatible SqlBackend backend, Monad m) => EntityField record typ -> ReaderT backend m Text
- getTableName :: forall record (m :: Type -> Type) backend. (PersistEntity record, BackendCompatible SqlBackend backend, Monad m) => record -> ReaderT backend m Text
- tableDBName :: PersistEntity record => record -> EntityNameDB
- fieldDBName :: PersistEntity record => EntityField record typ -> FieldNameDB
- rawQuery :: forall (m :: Type -> Type) env. (MonadResource m, MonadReader env m, BackendCompatible SqlBackend env) => Text -> [PersistValue] -> ConduitM () [PersistValue] m ()
- rawQueryRes :: forall (m1 :: Type -> Type) (m2 :: Type -> Type) env. (MonadIO m1, MonadIO m2, BackendCompatible SqlBackend env) => Text -> [PersistValue] -> ReaderT env m1 (Acquire (ConduitM () [PersistValue] m2 ()))
- rawExecute :: forall (m :: Type -> Type) backend. (MonadIO m, BackendCompatible SqlBackend backend) => Text -> [PersistValue] -> ReaderT backend m ()
- rawExecuteCount :: forall (m :: Type -> Type) backend. (MonadIO m, BackendCompatible SqlBackend backend) => Text -> [PersistValue] -> ReaderT backend m Int64
- rawSql :: forall a (m :: Type -> Type) backend. (RawSql a, MonadIO m, BackendCompatible SqlBackend backend) => Text -> [PersistValue] -> ReaderT backend m [a]
- deleteWhereCount :: forall val (m :: Type -> Type) backend. (PersistEntity val, MonadIO m, PersistEntityBackend val ~ SqlBackend, BackendCompatible SqlBackend backend) => [Filter val] -> ReaderT backend m Int64
- updateWhereCount :: forall val (m :: Type -> Type) backend. (PersistEntity val, MonadIO m, SqlBackend ~ PersistEntityBackend val, BackendCompatible SqlBackend backend) => [Filter val] -> [Update val] -> ReaderT backend m Int64
- filterClause :: PersistEntity val => Maybe FilterTablePrefix -> SqlBackend -> [Filter val] -> Text
- filterClauseWithVals :: PersistEntity val => Maybe FilterTablePrefix -> SqlBackend -> [Filter val] -> (Text, [PersistValue])
- orderClause :: PersistEntity val => Maybe FilterTablePrefix -> SqlBackend -> [SelectOpt val] -> Text
- data FilterTablePrefix
  - = PrefixTableName
  - | PrefixExcluded
- transactionSave :: forall (m :: Type -> Type). MonadIO m => ReaderT SqlBackend m ()
- transactionSaveWithIsolation :: forall (m :: Type -> Type). MonadIO m => IsolationLevel -> ReaderT SqlBackend m ()
- transactionUndo :: forall (m :: Type -> Type). MonadIO m => ReaderT SqlBackend m ()
- transactionUndoWithIsolation :: forall (m :: Type -> Type). MonadIO m => IsolationLevel -> ReaderT SqlBackend m ()
- getStmtConn :: SqlBackend -> Text -> IO Statement
- mkColumns :: [EntityDef] -> EntityDef -> BackendSpecificOverrides -> ([Column], [UniqueDef], [ForeignDef])
- data BackendSpecificOverrides
- emptyBackendSpecificOverrides :: BackendSpecificOverrides
- getBackendSpecificForeignKeyName :: BackendSpecificOverrides -> Maybe (EntityNameDB -> FieldNameDB -> ConstraintNameDB)
- setBackendSpecificForeignKeyName :: (EntityNameDB -> FieldNameDB -> ConstraintNameDB) -> BackendSpecificOverrides -> BackendSpecificOverrides
- defaultAttribute :: [FieldAttr] -> Maybe Text
- data IsolationLevel
  - = ReadUncommitted
  - | ReadCommitted
  - | RepeatableRead
  - | Serializable
- decorateSQLWithLimitOffset :: Text -> (Int, Int) -> Text -> Text
- newtype Single a = Single {
  - unSingle :: a
  }
- data Column = Column {
  - cName :: !FieldNameDB
  - cNull :: !Bool
  - cSqlType :: !SqlType
  - cDefault :: !(Maybe Text)
  - cGenerated :: !(Maybe Text)
  - cDefaultConstraintName :: !(Maybe ConstraintNameDB)
  - cMaxLen :: !(Maybe Integer)
  - cReference :: !(Maybe ColumnReference)
  }
- newtype OverflowNatural = OverflowNatural {
  - unOverflowNatural :: Natural
  }
- data SqlBackend
- newtype SqlReadBackend = SqlReadBackend {
  - unSqlReadBackend :: SqlBackend
  }
- newtype SqlWriteBackend = SqlWriteBackend {
  - unSqlWriteBackend :: SqlBackend
  }
- readToUnknown :: forall (m :: Type -> Type) a. Monad m => ReaderT SqlReadBackend m a -> ReaderT SqlBackend m a
- readToWrite :: forall (m :: Type -> Type) a. Monad m => ReaderT SqlReadBackend m a -> ReaderT SqlWriteBackend m a
- writeToUnknown :: forall (m :: Type -> Type) a. Monad m => ReaderT SqlWriteBackend m a -> ReaderT SqlBackend m a
- type LogFunc = Loc -> LogSource -> LogLevel -> LogStr -> IO ()
- data InsertSqlResult
  - = ISRSingle Text
  - | ISRInsertGet Text Text
  - | ISRManyKeys Text [PersistValue]
- data Statement = Statement {
  - stmtFinalize :: IO ()
  - stmtReset :: IO ()
  - stmtExecute :: [PersistValue] -> IO Int64
  - stmtQuery :: forall (m :: Type -> Type). MonadIO m => [PersistValue] -> Acquire (ConduitM () [PersistValue] m ())
  }
- type SqlBackendCanRead backend = (BackendCompatible SqlBackend backend, PersistQueryRead backend, PersistStoreRead backend, PersistUniqueRead backend)
- type SqlBackendCanWrite backend = (SqlBackendCanRead backend, PersistQueryWrite backend, PersistStoreWrite backend, PersistUniqueWrite backend)
- type SqlReadT (m :: Type -> Type) a = forall backend. SqlBackendCanRead backend => ReaderT backend m a
- type SqlWriteT (m :: Type -> Type) a = forall backend. SqlBackendCanWrite backend => ReaderT backend m a
- type IsSqlBackend backend = (IsPersistBackend backend, BaseBackend backend ~ SqlBackend)
- data ConnectionPoolConfig = ConnectionPoolConfig {
  - connectionPoolConfigStripes :: Int
  - connectionPoolConfigIdleTimeout :: NominalDiffTime
  - connectionPoolConfigSize :: Int
  }
- type ConnectionPool = Pool SqlBackend
- type SqlPersistT = ReaderT SqlBackend
- data ColumnReference = ColumnReference {
  - crTableName :: !EntityNameDB
  - crConstraintName :: !ConstraintNameDB
  - crFieldCascade :: !FieldCascade
  }
- data PersistentSqlException
  - = StatementAlreadyFinalized Text
  - | Couldn'tGetSQLConnection
- type SqlPersistM = SqlPersistT (NoLoggingT (ResourceT IO))
- defaultConnectionPoolConfig :: ConnectionPoolConfig

# `RawSql` and `PersistFieldSql`

class PersistField a => PersistFieldSql a where Source #

Tells Persistent what database column type should be used to store a Haskell type.

#### Examples

Expand

##### Simple Boolean Alternative

    data Switch = On | Off
      deriving (Show, Eq)

    instance PersistField Switch where
      toPersistValue s = case s of
        On -> PersistBool True
        Off -> PersistBool False
      fromPersistValue (PersistBool b) = if b then Right On else Right Off
      fromPersistValue x = Left $ "File.hs: When trying to deserialize a Switch: expected PersistBool, received: " <> T.pack (show x)

    instance PersistFieldSql Switch where
      sqlType _ = SqlBool

##### Non-Standard Database Types

If your database supports non-standard types, such as Postgres' `uuid`, you can use `SqlOther` to use them:

    import qualified Data.UUID as UUID
    instance PersistField UUID where
      toPersistValue = PersistLiteralEncoded . toASCIIBytes
      fromPersistValue (PersistLiteralEncoded uuid) =
        case fromASCIIBytes uuid of
          Nothing -> Left $ "Model/CustomTypes.hs: Failed to deserialize a UUID; received: " <> T.pack (show uuid)
          Just uuid' -> Right uuid'
      fromPersistValue x = Left $ "File.hs: When trying to deserialize a UUID: expected PersistLiteralEncoded, received: "-- >  <> T.pack (show x)

    instance PersistFieldSql UUID where
      sqlType _ = SqlOther "uuid"

##### User Created Database Types

Similarly, some databases support creating custom types, e.g. Postgres' DOMAIN and ENUM features. You can use `SqlOther` to specify a custom type:

    CREATE DOMAIN ssn AS text
          CHECK ( value ~ '^[0-9]{9}$');

    instance PersistFieldSQL SSN where
      sqlType _ = SqlOther "ssn"

    CREATE TYPE rainbow_color AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'indigo', 'violet');

    instance PersistFieldSQL RainbowColor where
      sqlType _ = SqlOther "rainbow_color"

Methods

sqlType :: Proxy a -> SqlType Source #

#### Instances

Instances details

PersistFieldSql Html Source # |
Instance details Defined in Database.Persist.Sql.Class Methods sqlType :: Proxy Html -> SqlType Source #
PersistFieldSql ByteString Source # |
Instance details Defined in Database.Persist.Sql.Class Methods sqlType :: Proxy ByteString -> SqlType Source #
PersistFieldSql Int16 Source # |
Instance details Defined in Database.Persist.Sql.Class Methods sqlType :: Proxy Int16 -> SqlType Source #
PersistFieldSql Int32 Source # |
Instance details Defined in Database.Persist.Sql.Class Methods sqlType :: Proxy Int32 -> SqlType Source #
PersistFieldSql Int64 Source # |
Instance details Defined in Database.Persist.Sql.Class Methods sqlType :: Proxy Int64 -> SqlType Source #
PersistFieldSql Int8 Source # |
Instance details Defined in Database.Persist.Sql.Class Methods sqlType :: Proxy Int8 -> SqlType Source #
PersistFieldSql Rational Source # |
Instance details Defined in Database.Persist.Sql.Class Methods sqlType :: Proxy Rational -> SqlType Source #
PersistFieldSql Word16 Source # |
Instance details Defined in Database.Persist.Sql.Class Methods sqlType :: Proxy Word16 -> SqlType Source #
PersistFieldSql Word32 Source # |
Instance details Defined in Database.Persist.Sql.Class Methods sqlType :: Proxy Word32 -> SqlType Source #
PersistFieldSql Word64 Source # |
Instance details Defined in Database.Persist.Sql.Class Methods sqlType :: Proxy Word64 -> SqlType Source #
PersistFieldSql Word8 Source # |
Instance details Defined in Database.Persist.Sql.Class Methods sqlType :: Proxy Word8 -> SqlType Source #
PersistFieldSql OverflowNatural Source # | This type uses the `SqlInt64` version, which will exhibit overflow and underflow behavior. Additionally, it permits negative values in the database, which isn't ideal. Since: 2.11.0
Instance details Defined in Database.Persist.Sql.Class Methods sqlType :: Proxy OverflowNatural -> SqlType Source #
PersistFieldSql PersistValue Source # |
Instance details Defined in Database.Persist.Sql.Class Methods sqlType :: Proxy PersistValue -> SqlType Source #
PersistFieldSql Checkmark Source # |
Instance details Defined in Database.Persist.Sql.Class Methods sqlType :: Proxy Checkmark -> SqlType Source #
PersistFieldSql Text Source # |
Instance details Defined in Database.Persist.Sql.Class Methods sqlType :: Proxy Text -> SqlType Source #
PersistFieldSql Text Source # |
Instance details Defined in Database.Persist.Sql.Class Methods sqlType :: Proxy Text -> SqlType Source #
PersistFieldSql Day Source # |
Instance details Defined in Database.Persist.Sql.Class Methods sqlType :: Proxy Day -> SqlType Source #
PersistFieldSql UTCTime Source # |
Instance details Defined in Database.Persist.Sql.Class Methods sqlType :: Proxy UTCTime -> SqlType Source #
PersistFieldSql TimeOfDay Source # |
Instance details Defined in Database.Persist.Sql.Class Methods sqlType :: Proxy TimeOfDay -> SqlType Source #
PersistFieldSql Bool Source # |
Instance details Defined in Database.Persist.Sql.Class Methods sqlType :: Proxy Bool -> SqlType Source #
PersistFieldSql Double Source # |
Instance details Defined in Database.Persist.Sql.Class Methods sqlType :: Proxy Double -> SqlType Source #
PersistFieldSql Int Source # |
Instance details Defined in Database.Persist.Sql.Class Methods sqlType :: Proxy Int -> SqlType Source #
PersistFieldSql Word Source # |
Instance details Defined in Database.Persist.Sql.Class Methods sqlType :: Proxy Word -> SqlType Source #
PersistFieldSql v => PersistFieldSql (IntMap v) Source # |
Instance details Defined in Database.Persist.Sql.Class Methods sqlType :: Proxy (IntMap v) -> SqlType Source #
(Ord a, PersistFieldSql a) => PersistFieldSql (Set a) Source # |
Instance details Defined in Database.Persist.Sql.Class Methods sqlType :: Proxy (Set a) -> SqlType Source #
(PersistField record, PersistEntity record) => PersistFieldSql (Entity record) Source # |
Instance details Defined in Database.Persist.Sql.Class Methods sqlType :: Proxy (Entity record) -> SqlType Source #
(BackendCompatible b s, PersistFieldSql (BackendKey b)) => PersistFieldSql (BackendKey (Compatible b s)) Source # |
Instance details Defined in Database.Persist.Compatible.Types Methods sqlType :: Proxy (BackendKey (Compatible b s)) -> SqlType Source #
PersistFieldSql (BackendKey SqlReadBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods sqlType :: Proxy (BackendKey SqlReadBackend) -> SqlType Source #
PersistFieldSql (BackendKey SqlWriteBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods sqlType :: Proxy (BackendKey SqlWriteBackend) -> SqlType Source #
PersistFieldSql (BackendKey SqlBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods sqlType :: Proxy (BackendKey SqlBackend) -> SqlType Source #
PersistFieldSql a => PersistFieldSql (Vector a) Source # |
Instance details Defined in Database.Persist.Sql.Class Methods sqlType :: Proxy (Vector a) -> SqlType Source #
PersistFieldSql a => PersistFieldSql (Maybe a) Source # |
Instance details Defined in Database.Persist.Sql.Class Methods sqlType :: Proxy (Maybe a) -> SqlType Source #
PersistFieldSql [Char] Source # |
Instance details Defined in Database.Persist.Sql.Class Methods sqlType :: Proxy [Char] -> SqlType Source #
PersistFieldSql a => PersistFieldSql [a] Source # |
Instance details Defined in Database.Persist.Sql.Class Methods sqlType :: Proxy [a] -> SqlType Source #
HasResolution a => PersistFieldSql (Fixed a) Source # |
Instance details Defined in Database.Persist.Sql.Class Methods sqlType :: Proxy (Fixed a) -> SqlType Source #
PersistFieldSql v => PersistFieldSql (Map Text v) Source # |
Instance details Defined in Database.Persist.Sql.Class Methods sqlType :: Proxy (Map Text v) -> SqlType Source #
(PersistFieldSql a, PersistFieldSql b) => PersistFieldSql (a, b) Source # |
Instance details Defined in Database.Persist.Sql.Class Methods sqlType :: Proxy (a, b) -> SqlType Source #

class RawSql a where Source #

Class for data types that may be retrived from a `rawSql` query.

Methods

rawSqlCols :: (Text -> Text) -> a -> (Int, [Text]) Source #

Number of columns that this data type needs and the list of substitutions for `SELECT` placeholders `??`.

rawSqlColCountReason :: a -> String Source #

A string telling the user why the column count is what it is.

rawSqlProcessRow :: [PersistValue] -> Either Text a Source #

Transform a row of the result into the data type.

#### Instances

Instances details

(PersistEntity record, PersistEntityBackend record ~ backend, IsPersistBackend backend) => RawSql (Entity record) Source # |
Instance details Defined in Database.Persist.Sql.Class Methods rawSqlCols :: (Text -> Text) -> Entity record -> (Int, [Text]) Source # rawSqlColCountReason :: Entity record -> String Source # rawSqlProcessRow :: [PersistValue] -> Either Text (Entity record) Source #
(PersistEntity a, PersistEntityBackend a ~ backend, IsPersistBackend backend) => RawSql (Key a) Source # |
Instance details Defined in Database.Persist.Sql.Class Methods rawSqlCols :: (Text -> Text) -> Key a -> (Int, [Text]) Source # rawSqlColCountReason :: Key a -> String Source # rawSqlProcessRow :: [PersistValue] -> Either Text (Key a) Source #
PersistField a => RawSql (Single a) Source # |
Instance details Defined in Database.Persist.Sql.Class Methods rawSqlCols :: (Text -> Text) -> Single a -> (Int, [Text]) Source # rawSqlColCountReason :: Single a -> String Source # rawSqlProcessRow :: [PersistValue] -> Either Text (Single a) Source #
RawSql a => RawSql (Maybe a) Source # | Since: 1.0.1
Instance details Defined in Database.Persist.Sql.Class Methods rawSqlCols :: (Text -> Text) -> Maybe a -> (Int, [Text]) Source # rawSqlColCountReason :: Maybe a -> String Source # rawSqlProcessRow :: [PersistValue] -> Either Text (Maybe a) Source #
(PersistEntity record, KnownSymbol prefix, PersistEntityBackend record ~ backend, IsPersistBackend backend) => RawSql (EntityWithPrefix prefix record) Source # |
Instance details Defined in Database.Persist.Sql.Class Methods rawSqlCols :: (Text -> Text) -> EntityWithPrefix prefix record -> (Int, [Text]) Source # rawSqlColCountReason :: EntityWithPrefix prefix record -> String Source # rawSqlProcessRow :: [PersistValue] -> Either Text (EntityWithPrefix prefix record) Source #
(RawSql a, RawSql b) => RawSql (a, b) Source # |
Instance details Defined in Database.Persist.Sql.Class Methods rawSqlCols :: (Text -> Text) -> (a, b) -> (Int, [Text]) Source # rawSqlColCountReason :: (a, b) -> String Source # rawSqlProcessRow :: [PersistValue] -> Either Text (a, b) Source #
(RawSql a, RawSql b, RawSql c) => RawSql (a, b, c) Source # |
Instance details Defined in Database.Persist.Sql.Class Methods rawSqlCols :: (Text -> Text) -> (a, b, c) -> (Int, [Text]) Source # rawSqlColCountReason :: (a, b, c) -> String Source # rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c) Source #
(RawSql a, RawSql b, RawSql c, RawSql d) => RawSql (a, b, c, d) Source # |
Instance details Defined in Database.Persist.Sql.Class Methods rawSqlCols :: (Text -> Text) -> (a, b, c, d) -> (Int, [Text]) Source # rawSqlColCountReason :: (a, b, c, d) -> String Source # rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d) Source #
(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e) => RawSql (a, b, c, d, e) Source # |
Instance details Defined in Database.Persist.Sql.Class Methods rawSqlCols :: (Text -> Text) -> (a, b, c, d, e) -> (Int, [Text]) Source # rawSqlColCountReason :: (a, b, c, d, e) -> String Source # rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e) Source #
(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f) => RawSql (a, b, c, d, e, f) Source # |
Instance details Defined in Database.Persist.Sql.Class Methods rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f) -> (Int, [Text]) Source # rawSqlColCountReason :: (a, b, c, d, e, f) -> String Source # rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f) Source #
(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g) => RawSql (a, b, c, d, e, f, g) Source # |
Instance details Defined in Database.Persist.Sql.Class Methods rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g) -> (Int, [Text]) Source # rawSqlColCountReason :: (a, b, c, d, e, f, g) -> String Source # rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g) Source #
(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g, RawSql h) => RawSql (a, b, c, d, e, f, g, h) Source # |
Instance details Defined in Database.Persist.Sql.Class Methods rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h) -> (Int, [Text]) Source # rawSqlColCountReason :: (a, b, c, d, e, f, g, h) -> String Source # rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h) Source #
(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g, RawSql h, RawSql i) => RawSql (a, b, c, d, e, f, g, h, i) Source # | Since: 2.10.2
Instance details Defined in Database.Persist.Sql.Class Methods rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i) -> (Int, [Text]) Source # rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i) -> String Source # rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i) Source #
(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g, RawSql h, RawSql i, RawSql j) => RawSql (a, b, c, d, e, f, g, h, i, j) Source # | Since: 2.10.2
Instance details Defined in Database.Persist.Sql.Class Methods rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i, j) -> (Int, [Text]) Source # rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j) -> String Source # rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j) Source #
(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g, RawSql h, RawSql i, RawSql j, RawSql k) => RawSql (a, b, c, d, e, f, g, h, i, j, k) Source # | Since: 2.10.2
Instance details Defined in Database.Persist.Sql.Class Methods rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i, j, k) -> (Int, [Text]) Source # rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k) -> String Source # rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k) Source #
(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g, RawSql h, RawSql i, RawSql j, RawSql k, RawSql l) => RawSql (a, b, c, d, e, f, g, h, i, j, k, l) Source # | Since: 2.10.2
Instance details Defined in Database.Persist.Sql.Class Methods rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> (Int, [Text]) Source # rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l) -> String Source # rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l) Source #
(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g, RawSql h, RawSql i, RawSql j, RawSql k, RawSql l, RawSql m) => RawSql (a, b, c, d, e, f, g, h, i, j, k, l, m) Source # | Since: 2.11.0
Instance details Defined in Database.Persist.Sql.Class Methods rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i, j, k, l, m) -> (Int, [Text]) Source # rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> String Source # rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m) Source #
(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g, RawSql h, RawSql i, RawSql j, RawSql k, RawSql l, RawSql m, RawSql n) => RawSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n) Source # | Since: 2.11.0
Instance details Defined in Database.Persist.Sql.Class Methods rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> (Int, [Text]) Source # rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> String Source # rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m, n) Source #
(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g, RawSql h, RawSql i, RawSql j, RawSql k, RawSql l, RawSql m, RawSql n, RawSql o) => RawSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) Source # | Since: 2.11.0
Instance details Defined in Database.Persist.Sql.Class Methods rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> (Int, [Text]) Source # rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> String Source # rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) Source #
(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g, RawSql h, RawSql i, RawSql j, RawSql k, RawSql l, RawSql m, RawSql n, RawSql o, RawSql p) => RawSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) Source # | Since: 2.11.0
Instance details Defined in Database.Persist.Sql.Class Methods rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) -> (Int, [Text]) Source # rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) -> String Source # rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) Source #
(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g, RawSql h, RawSql i, RawSql j, RawSql k, RawSql l, RawSql m, RawSql n, RawSql o, RawSql p, RawSql q) => RawSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) Source # | Since: 2.11.0
Instance details Defined in Database.Persist.Sql.Class Methods rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) -> (Int, [Text]) Source # rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) -> String Source # rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) Source #
(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g, RawSql h, RawSql i, RawSql j, RawSql k, RawSql l, RawSql m, RawSql n, RawSql o, RawSql p, RawSql q, RawSql r) => RawSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) Source # | Since: 2.11.0
Instance details Defined in Database.Persist.Sql.Class Methods rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) -> (Int, [Text]) Source # rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) -> String Source # rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) Source #
(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g, RawSql h, RawSql i, RawSql j, RawSql k, RawSql l, RawSql m, RawSql n, RawSql o, RawSql p, RawSql q, RawSql r, RawSql s) => RawSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) Source # | Since: 2.11.0
Instance details Defined in Database.Persist.Sql.Class Methods rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) -> (Int, [Text]) Source # rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) -> String Source # rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) Source #
(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g, RawSql h, RawSql i, RawSql j, RawSql k, RawSql l, RawSql m, RawSql n, RawSql o, RawSql p, RawSql q, RawSql r, RawSql s, RawSql t) => RawSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) Source # | Since: 2.11.0

Instance details

Defined in Database.Persist.Sql.Class

Methods

rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) -> (Int, [Text]) Source #

rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) -> String Source #

rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) Source #

(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g, RawSql h, RawSql i, RawSql j, RawSql k, RawSql l, RawSql m, RawSql n, RawSql o, RawSql p, RawSql q, RawSql r, RawSql s, RawSql t, RawSql u) => RawSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) Source # | Since: 2.11.0

Instance details

Defined in Database.Persist.Sql.Class

Methods

rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) -> (Int, [Text]) Source #

rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) -> String Source #

rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) Source #

(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g, RawSql h, RawSql i, RawSql j, RawSql k, RawSql l, RawSql m, RawSql n, RawSql o, RawSql p, RawSql q, RawSql r, RawSql s, RawSql t, RawSql u, RawSql v) => RawSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) Source # | Since: 2.11.0

Instance details

Defined in Database.Persist.Sql.Class

Methods

rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) -> (Int, [Text]) Source #

rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) -> String Source #

rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) Source #

(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g, RawSql h, RawSql i, RawSql j, RawSql k, RawSql l, RawSql m, RawSql n, RawSql o, RawSql p, RawSql q, RawSql r, RawSql s, RawSql t, RawSql u, RawSql v, RawSql w) => RawSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) Source # | Since: 2.11.0

Instance details

Defined in Database.Persist.Sql.Class

Methods

rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) -> (Int, [Text]) Source #

rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) -> String Source #

rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) Source #

(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g, RawSql h, RawSql i, RawSql j, RawSql k, RawSql l, RawSql m, RawSql n, RawSql o, RawSql p, RawSql q, RawSql r, RawSql s, RawSql t, RawSql u, RawSql v, RawSql w, RawSql x) => RawSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) Source # | Since: 2.11.0

Instance details

Defined in Database.Persist.Sql.Class

Methods

rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) -> (Int, [Text]) Source #

rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) -> String Source #

rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) Source #

(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g, RawSql h, RawSql i, RawSql j, RawSql k, RawSql l, RawSql m, RawSql n, RawSql o, RawSql p, RawSql q, RawSql r, RawSql s, RawSql t, RawSql u, RawSql v, RawSql w, RawSql x, RawSql y) => RawSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) Source # | Since: 2.11.0

Instance details

Defined in Database.Persist.Sql.Class

Methods

rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) -> (Int, [Text]) Source #

rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) -> String Source #

rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) Source #

(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g, RawSql h, RawSql i, RawSql j, RawSql k, RawSql l, RawSql m, RawSql n, RawSql o, RawSql p, RawSql q, RawSql r, RawSql s, RawSql t, RawSql u, RawSql v, RawSql w, RawSql x, RawSql y, RawSql z) => RawSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z) Source # | Since: 2.11.0

Instance details

Defined in Database.Persist.Sql.Class

Methods

rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z) -> (Int, [Text]) Source #

rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z) -> String Source #

rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z) Source #

(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g, RawSql h, RawSql i, RawSql j, RawSql k, RawSql l, RawSql m, RawSql n, RawSql o, RawSql p, RawSql q, RawSql r, RawSql s, RawSql t, RawSql u, RawSql v, RawSql w, RawSql x, RawSql y, RawSql z, RawSql a2) => RawSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2) Source # | Since: 2.11.0

Instance details

Defined in Database.Persist.Sql.Class

Methods

rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2) -> (Int, [Text]) Source #

rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2) -> String Source #

rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2) Source #

(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g, RawSql h, RawSql i, RawSql j, RawSql k, RawSql l, RawSql m, RawSql n, RawSql o, RawSql p, RawSql q, RawSql r, RawSql s, RawSql t, RawSql u, RawSql v, RawSql w, RawSql x, RawSql y, RawSql z, RawSql a2, RawSql b2) => RawSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2) Source #

Since: 2.11.0

Instance details

Defined in Database.Persist.Sql.Class

Methods

rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2) -> (Int, [Text]) Source #

rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2) -> String Source #

rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2) Source #

(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g, RawSql h, RawSql i, RawSql j, RawSql k, RawSql l, RawSql m, RawSql n, RawSql o, RawSql p, RawSql q, RawSql r, RawSql s, RawSql t, RawSql u, RawSql v, RawSql w, RawSql x, RawSql y, RawSql z, RawSql a2, RawSql b2, RawSql c2) => RawSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2) Source #

Since: 2.11.0

Instance details

Defined in Database.Persist.Sql.Class

Methods

rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2) -> (Int, [Text]) Source #

rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2) -> String Source #

rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2) Source #

(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g, RawSql h, RawSql i, RawSql j, RawSql k, RawSql l, RawSql m, RawSql n, RawSql o, RawSql p, RawSql q, RawSql r, RawSql s, RawSql t, RawSql u, RawSql v, RawSql w, RawSql x, RawSql y, RawSql z, RawSql a2, RawSql b2, RawSql c2, RawSql d2) => RawSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2) Source #

Since: 2.11.0

Instance details

Defined in Database.Persist.Sql.Class

Methods

rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2) -> (Int, [Text]) Source #

rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2) -> String Source #

rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2) Source #

(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g, RawSql h, RawSql i, RawSql j, RawSql k, RawSql l, RawSql m, RawSql n, RawSql o, RawSql p, RawSql q, RawSql r, RawSql s, RawSql t, RawSql u, RawSql v, RawSql w, RawSql x, RawSql y, RawSql z, RawSql a2, RawSql b2, RawSql c2, RawSql d2, RawSql e2) => RawSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2) Source #

Since: 2.11.0

Instance details

Defined in Database.Persist.Sql.Class

Methods

rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2) -> (Int, [Text]) Source #

rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2) -> String Source #

rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2) Source #

(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g, RawSql h, RawSql i, RawSql j, RawSql k, RawSql l, RawSql m, RawSql n, RawSql o, RawSql p, RawSql q, RawSql r, RawSql s, RawSql t, RawSql u, RawSql v, RawSql w, RawSql x, RawSql y, RawSql z, RawSql a2, RawSql b2, RawSql c2, RawSql d2, RawSql e2, RawSql f2) => RawSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2) Source #

Since: 2.11.0

Instance details

Defined in Database.Persist.Sql.Class

Methods

rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2) -> (Int, [Text]) Source #

rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2) -> String Source #

rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2) Source #

(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g, RawSql h, RawSql i, RawSql j, RawSql k, RawSql l, RawSql m, RawSql n, RawSql o, RawSql p, RawSql q, RawSql r, RawSql s, RawSql t, RawSql u, RawSql v, RawSql w, RawSql x, RawSql y, RawSql z, RawSql a2, RawSql b2, RawSql c2, RawSql d2, RawSql e2, RawSql f2, RawSql g2) => RawSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2) Source #

Since: 2.11.0

Instance details

Defined in Database.Persist.Sql.Class

Methods

rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2) -> (Int, [Text]) Source #

rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2) -> String Source #

rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2) Source #

(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g, RawSql h, RawSql i, RawSql j, RawSql k, RawSql l, RawSql m, RawSql n, RawSql o, RawSql p, RawSql q, RawSql r, RawSql s, RawSql t, RawSql u, RawSql v, RawSql w, RawSql x, RawSql y, RawSql z, RawSql a2, RawSql b2, RawSql c2, RawSql d2, RawSql e2, RawSql f2, RawSql g2, RawSql h2) => RawSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2) Source #

Since: 2.11.0

Instance details

Defined in Database.Persist.Sql.Class

Methods

rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2) -> (Int, [Text]) Source #

rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2) -> String Source #

rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2) Source #

(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g, RawSql h, RawSql i, RawSql j, RawSql k, RawSql l, RawSql m, RawSql n, RawSql o, RawSql p, RawSql q, RawSql r, RawSql s, RawSql t, RawSql u, RawSql v, RawSql w, RawSql x, RawSql y, RawSql z, RawSql a2, RawSql b2, RawSql c2, RawSql d2, RawSql e2, RawSql f2, RawSql g2, RawSql h2, RawSql i2) => RawSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2) Source #

Since: 2.11.0

Instance details

Defined in Database.Persist.Sql.Class

Methods

rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2) -> (Int, [Text]) Source #

rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2) -> String Source #

rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2) Source #

(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g, RawSql h, RawSql i, RawSql j, RawSql k, RawSql l, RawSql m, RawSql n, RawSql o, RawSql p, RawSql q, RawSql r, RawSql s, RawSql t, RawSql u, RawSql v, RawSql w, RawSql x, RawSql y, RawSql z, RawSql a2, RawSql b2, RawSql c2, RawSql d2, RawSql e2, RawSql f2, RawSql g2, RawSql h2, RawSql i2, RawSql j2) => RawSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2) Source #

Since: 2.11.0

Instance details

Defined in Database.Persist.Sql.Class

Methods

rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2) -> (Int, [Text]) Source #

rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2) -> String Source #

rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2) Source #

(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g, RawSql h, RawSql i, RawSql j, RawSql k, RawSql l, RawSql m, RawSql n, RawSql o, RawSql p, RawSql q, RawSql r, RawSql s, RawSql t, RawSql u, RawSql v, RawSql w, RawSql x, RawSql y, RawSql z, RawSql a2, RawSql b2, RawSql c2, RawSql d2, RawSql e2, RawSql f2, RawSql g2, RawSql h2, RawSql i2, RawSql j2, RawSql k2) => RawSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2) Source #

Since: 2.11.0

Instance details

Defined in Database.Persist.Sql.Class

Methods

rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2) -> (Int, [Text]) Source #

rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2) -> String Source #

rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2) Source #

(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g, RawSql h, RawSql i, RawSql j, RawSql k, RawSql l, RawSql m, RawSql n, RawSql o, RawSql p, RawSql q, RawSql r, RawSql s, RawSql t, RawSql u, RawSql v, RawSql w, RawSql x, RawSql y, RawSql z, RawSql a2, RawSql b2, RawSql c2, RawSql d2, RawSql e2, RawSql f2, RawSql g2, RawSql h2, RawSql i2, RawSql j2, RawSql k2, RawSql l2) => RawSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2) Source #

Since: 2.11.0

Instance details

Defined in Database.Persist.Sql.Class

Methods

rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2) -> (Int, [Text]) Source #

rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2) -> String Source #

rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2) Source #

(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g, RawSql h, RawSql i, RawSql j, RawSql k, RawSql l, RawSql m, RawSql n, RawSql o, RawSql p, RawSql q, RawSql r, RawSql s, RawSql t, RawSql u, RawSql v, RawSql w, RawSql x, RawSql y, RawSql z, RawSql a2, RawSql b2, RawSql c2, RawSql d2, RawSql e2, RawSql f2, RawSql g2, RawSql h2, RawSql i2, RawSql j2, RawSql k2, RawSql l2, RawSql m2) => RawSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2) Source #

Since: 2.11.0

Instance details

Defined in Database.Persist.Sql.Class

Methods

rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2) -> (Int, [Text]) Source #

rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2) -> String Source #

rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2) Source #

(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g, RawSql h, RawSql i, RawSql j, RawSql k, RawSql l, RawSql m, RawSql n, RawSql o, RawSql p, RawSql q, RawSql r, RawSql s, RawSql t, RawSql u, RawSql v, RawSql w, RawSql x, RawSql y, RawSql z, RawSql a2, RawSql b2, RawSql c2, RawSql d2, RawSql e2, RawSql f2, RawSql g2, RawSql h2, RawSql i2, RawSql j2, RawSql k2, RawSql l2, RawSql m2, RawSql n2) => RawSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2) Source #

Since: 2.11.0

Instance details

Defined in Database.Persist.Sql.Class

Methods

rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2) -> (Int, [Text]) Source #

rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2) -> String Source #

rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2) Source #

(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g, RawSql h, RawSql i, RawSql j, RawSql k, RawSql l, RawSql m, RawSql n, RawSql o, RawSql p, RawSql q, RawSql r, RawSql s, RawSql t, RawSql u, RawSql v, RawSql w, RawSql x, RawSql y, RawSql z, RawSql a2, RawSql b2, RawSql c2, RawSql d2, RawSql e2, RawSql f2, RawSql g2, RawSql h2, RawSql i2, RawSql j2, RawSql k2, RawSql l2, RawSql m2, RawSql n2, RawSql o2) => RawSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2) Source #

Since: 2.11.0

Instance details

Defined in Database.Persist.Sql.Class

Methods

rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2) -> (Int, [Text]) Source #

rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2) -> String Source #

rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2) Source #

(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g, RawSql h, RawSql i, RawSql j, RawSql k, RawSql l, RawSql m, RawSql n, RawSql o, RawSql p, RawSql q, RawSql r, RawSql s, RawSql t, RawSql u, RawSql v, RawSql w, RawSql x, RawSql y, RawSql z, RawSql a2, RawSql b2, RawSql c2, RawSql d2, RawSql e2, RawSql f2, RawSql g2, RawSql h2, RawSql i2, RawSql j2, RawSql k2, RawSql l2, RawSql m2, RawSql n2, RawSql o2, RawSql p2) => RawSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2) Source #

Since: 2.11.0

Instance details

Defined in Database.Persist.Sql.Class

Methods

rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2) -> (Int, [Text]) Source #

rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2) -> String Source #

rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2) Source #

(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g, RawSql h, RawSql i, RawSql j, RawSql k, RawSql l, RawSql m, RawSql n, RawSql o, RawSql p, RawSql q, RawSql r, RawSql s, RawSql t, RawSql u, RawSql v, RawSql w, RawSql x, RawSql y, RawSql z, RawSql a2, RawSql b2, RawSql c2, RawSql d2, RawSql e2, RawSql f2, RawSql g2, RawSql h2, RawSql i2, RawSql j2, RawSql k2, RawSql l2, RawSql m2, RawSql n2, RawSql o2, RawSql p2, RawSql q2) => RawSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2) Source #

Since: 2.11.0

Instance details

Defined in Database.Persist.Sql.Class

Methods

rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2) -> (Int, [Text]) Source #

rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2) -> String Source #

rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2) Source #

(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g, RawSql h, RawSql i, RawSql j, RawSql k, RawSql l, RawSql m, RawSql n, RawSql o, RawSql p, RawSql q, RawSql r, RawSql s, RawSql t, RawSql u, RawSql v, RawSql w, RawSql x, RawSql y, RawSql z, RawSql a2, RawSql b2, RawSql c2, RawSql d2, RawSql e2, RawSql f2, RawSql g2, RawSql h2, RawSql i2, RawSql j2, RawSql k2, RawSql l2, RawSql m2, RawSql n2, RawSql o2, RawSql p2, RawSql q2, RawSql r2) => RawSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2) Source #

Since: 2.11.0

Instance details

Defined in Database.Persist.Sql.Class

Methods

rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2) -> (Int, [Text]) Source #

rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2) -> String Source #

rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2) Source #

(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g, RawSql h, RawSql i, RawSql j, RawSql k, RawSql l, RawSql m, RawSql n, RawSql o, RawSql p, RawSql q, RawSql r, RawSql s, RawSql t, RawSql u, RawSql v, RawSql w, RawSql x, RawSql y, RawSql z, RawSql a2, RawSql b2, RawSql c2, RawSql d2, RawSql e2, RawSql f2, RawSql g2, RawSql h2, RawSql i2, RawSql j2, RawSql k2, RawSql l2, RawSql m2, RawSql n2, RawSql o2, RawSql p2, RawSql q2, RawSql r2, RawSql s2) => RawSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2) Source #

Since: 2.11.0

Instance details

Defined in Database.Persist.Sql.Class

Methods

rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2) -> (Int, [Text]) Source #

rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2) -> String Source #

rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2) Source #

(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g, RawSql h, RawSql i, RawSql j, RawSql k, RawSql l, RawSql m, RawSql n, RawSql o, RawSql p, RawSql q, RawSql r, RawSql s, RawSql t, RawSql u, RawSql v, RawSql w, RawSql x, RawSql y, RawSql z, RawSql a2, RawSql b2, RawSql c2, RawSql d2, RawSql e2, RawSql f2, RawSql g2, RawSql h2, RawSql i2, RawSql j2, RawSql k2, RawSql l2, RawSql m2, RawSql n2, RawSql o2, RawSql p2, RawSql q2, RawSql r2, RawSql s2, RawSql t2) => RawSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2) Source #

Since: 2.11.0

Instance details

Defined in Database.Persist.Sql.Class

Methods

rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2) -> (Int, [Text]) Source #

rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2) -> String Source #

rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2) Source #

(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g, RawSql h, RawSql i, RawSql j, RawSql k, RawSql l, RawSql m, RawSql n, RawSql o, RawSql p, RawSql q, RawSql r, RawSql s, RawSql t, RawSql u, RawSql v, RawSql w, RawSql x, RawSql y, RawSql z, RawSql a2, RawSql b2, RawSql c2, RawSql d2, RawSql e2, RawSql f2, RawSql g2, RawSql h2, RawSql i2, RawSql j2, RawSql k2, RawSql l2, RawSql m2, RawSql n2, RawSql o2, RawSql p2, RawSql q2, RawSql r2, RawSql s2, RawSql t2, RawSql u2) => RawSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2) Source #

Since: 2.11.0

Instance details

Defined in Database.Persist.Sql.Class

Methods

rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2) -> (Int, [Text]) Source #

rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2) -> String Source #

rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2) Source #

(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g, RawSql h, RawSql i, RawSql j, RawSql k, RawSql l, RawSql m, RawSql n, RawSql o, RawSql p, RawSql q, RawSql r, RawSql s, RawSql t, RawSql u, RawSql v, RawSql w, RawSql x, RawSql y, RawSql z, RawSql a2, RawSql b2, RawSql c2, RawSql d2, RawSql e2, RawSql f2, RawSql g2, RawSql h2, RawSql i2, RawSql j2, RawSql k2, RawSql l2, RawSql m2, RawSql n2, RawSql o2, RawSql p2, RawSql q2, RawSql r2, RawSql s2, RawSql t2, RawSql u2, RawSql v2) => RawSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2) Source #

Since: 2.11.0

Instance details

Defined in Database.Persist.Sql.Class

Methods

rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2) -> (Int, [Text]) Source #

rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2) -> String Source #

rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2) Source #

(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g, RawSql h, RawSql i, RawSql j, RawSql k, RawSql l, RawSql m, RawSql n, RawSql o, RawSql p, RawSql q, RawSql r, RawSql s, RawSql t, RawSql u, RawSql v, RawSql w, RawSql x, RawSql y, RawSql z, RawSql a2, RawSql b2, RawSql c2, RawSql d2, RawSql e2, RawSql f2, RawSql g2, RawSql h2, RawSql i2, RawSql j2, RawSql k2, RawSql l2, RawSql m2, RawSql n2, RawSql o2, RawSql p2, RawSql q2, RawSql r2, RawSql s2, RawSql t2, RawSql u2, RawSql v2, RawSql w2) => RawSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2) Source #

Since: 2.11.0

Instance details

Defined in Database.Persist.Sql.Class

Methods

rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2) -> (Int, [Text]) Source #

rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2) -> String Source #

rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2) Source #

(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g, RawSql h, RawSql i, RawSql j, RawSql k, RawSql l, RawSql m, RawSql n, RawSql o, RawSql p, RawSql q, RawSql r, RawSql s, RawSql t, RawSql u, RawSql v, RawSql w, RawSql x, RawSql y, RawSql z, RawSql a2, RawSql b2, RawSql c2, RawSql d2, RawSql e2, RawSql f2, RawSql g2, RawSql h2, RawSql i2, RawSql j2, RawSql k2, RawSql l2, RawSql m2, RawSql n2, RawSql o2, RawSql p2, RawSql q2, RawSql r2, RawSql s2, RawSql t2, RawSql u2, RawSql v2, RawSql w2, RawSql x2) => RawSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2, x2) Source #

Since: 2.11.0

Instance details

Defined in Database.Persist.Sql.Class

Methods

rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2, x2) -> (Int, [Text]) Source #

rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2, x2) -> String Source #

rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2, x2) Source #

(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g, RawSql h, RawSql i, RawSql j, RawSql k, RawSql l, RawSql m, RawSql n, RawSql o, RawSql p, RawSql q, RawSql r, RawSql s, RawSql t, RawSql u, RawSql v, RawSql w, RawSql x, RawSql y, RawSql z, RawSql a2, RawSql b2, RawSql c2, RawSql d2, RawSql e2, RawSql f2, RawSql g2, RawSql h2, RawSql i2, RawSql j2, RawSql k2, RawSql l2, RawSql m2, RawSql n2, RawSql o2, RawSql p2, RawSql q2, RawSql r2, RawSql s2, RawSql t2, RawSql u2, RawSql v2, RawSql w2, RawSql x2, RawSql y2) => RawSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2, x2, y2) Source #

Since: 2.11.0

Instance details

Defined in Database.Persist.Sql.Class

Methods

rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2, x2, y2) -> (Int, [Text]) Source #

rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2, x2, y2) -> String Source #

rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2, x2, y2) Source #

(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g, RawSql h, RawSql i, RawSql j, RawSql k, RawSql l, RawSql m, RawSql n, RawSql o, RawSql p, RawSql q, RawSql r, RawSql s, RawSql t, RawSql u, RawSql v, RawSql w, RawSql x, RawSql y, RawSql z, RawSql a2, RawSql b2, RawSql c2, RawSql d2, RawSql e2, RawSql f2, RawSql g2, RawSql h2, RawSql i2, RawSql j2, RawSql k2, RawSql l2, RawSql m2, RawSql n2, RawSql o2, RawSql p2, RawSql q2, RawSql r2, RawSql s2, RawSql t2, RawSql u2, RawSql v2, RawSql w2, RawSql x2, RawSql y2, RawSql z2) => RawSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2, x2, y2, z2) Source #

Since: 2.11.0

Instance details

Defined in Database.Persist.Sql.Class

Methods

rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2, x2, y2, z2) -> (Int, [Text]) Source #

rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2, x2, y2, z2) -> String Source #

rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2, x2, y2, z2) Source #

(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g, RawSql h, RawSql i, RawSql j, RawSql k, RawSql l, RawSql m, RawSql n, RawSql o, RawSql p, RawSql q, RawSql r, RawSql s, RawSql t, RawSql u, RawSql v, RawSql w, RawSql x, RawSql y, RawSql z, RawSql a2, RawSql b2, RawSql c2, RawSql d2, RawSql e2, RawSql f2, RawSql g2, RawSql h2, RawSql i2, RawSql j2, RawSql k2, RawSql l2, RawSql m2, RawSql n2, RawSql o2, RawSql p2, RawSql q2, RawSql r2, RawSql s2, RawSql t2, RawSql u2, RawSql v2, RawSql w2, RawSql x2, RawSql y2, RawSql z2, RawSql a3) => RawSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2, x2, y2, z2, a3) Source #

Since: 2.11.0

Instance details

Defined in Database.Persist.Sql.Class

Methods

rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2, x2, y2, z2, a3) -> (Int, [Text]) Source #

rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2, x2, y2, z2, a3) -> String Source #

rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2, x2, y2, z2, a3) Source #

(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g, RawSql h, RawSql i, RawSql j, RawSql k, RawSql l, RawSql m, RawSql n, RawSql o, RawSql p, RawSql q, RawSql r, RawSql s, RawSql t, RawSql u, RawSql v, RawSql w, RawSql x, RawSql y, RawSql z, RawSql a2, RawSql b2, RawSql c2, RawSql d2, RawSql e2, RawSql f2, RawSql g2, RawSql h2, RawSql i2, RawSql j2, RawSql k2, RawSql l2, RawSql m2, RawSql n2, RawSql o2, RawSql p2, RawSql q2, RawSql r2, RawSql s2, RawSql t2, RawSql u2, RawSql v2, RawSql w2, RawSql x2, RawSql y2, RawSql z2, RawSql a3, RawSql b3) => RawSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2, x2, y2, z2, a3, b3) Source #

Since: 2.11.0

Instance details

Defined in Database.Persist.Sql.Class

Methods

rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2, x2, y2, z2, a3, b3) -> (Int, [Text]) Source #

rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2, x2, y2, z2, a3, b3) -> String Source #

rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2, x2, y2, z2, a3, b3) Source #

(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g, RawSql h, RawSql i, RawSql j, RawSql k, RawSql l, RawSql m, RawSql n, RawSql o, RawSql p, RawSql q, RawSql r, RawSql s, RawSql t, RawSql u, RawSql v, RawSql w, RawSql x, RawSql y, RawSql z, RawSql a2, RawSql b2, RawSql c2, RawSql d2, RawSql e2, RawSql f2, RawSql g2, RawSql h2, RawSql i2, RawSql j2, RawSql k2, RawSql l2, RawSql m2, RawSql n2, RawSql o2, RawSql p2, RawSql q2, RawSql r2, RawSql s2, RawSql t2, RawSql u2, RawSql v2, RawSql w2, RawSql x2, RawSql y2, RawSql z2, RawSql a3, RawSql b3, RawSql c3) => RawSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2, x2, y2, z2, a3, b3, c3) Source #

Since: 2.11.0

Instance details

Defined in Database.Persist.Sql.Class

Methods

rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2, x2, y2, z2, a3, b3, c3) -> (Int, [Text]) Source #

rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2, x2, y2, z2, a3, b3, c3) -> String Source #

rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2, x2, y2, z2, a3, b3, c3) Source #

(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g, RawSql h, RawSql i, RawSql j, RawSql k, RawSql l, RawSql m, RawSql n, RawSql o, RawSql p, RawSql q, RawSql r, RawSql s, RawSql t, RawSql u, RawSql v, RawSql w, RawSql x, RawSql y, RawSql z, RawSql a2, RawSql b2, RawSql c2, RawSql d2, RawSql e2, RawSql f2, RawSql g2, RawSql h2, RawSql i2, RawSql j2, RawSql k2, RawSql l2, RawSql m2, RawSql n2, RawSql o2, RawSql p2, RawSql q2, RawSql r2, RawSql s2, RawSql t2, RawSql u2, RawSql v2, RawSql w2, RawSql x2, RawSql y2, RawSql z2, RawSql a3, RawSql b3, RawSql c3, RawSql d3) => RawSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2, x2, y2, z2, a3, b3, c3, d3) Source #

Since: 2.11.0

Instance details

Defined in Database.Persist.Sql.Class

Methods

rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2, x2, y2, z2, a3, b3, c3, d3) -> (Int, [Text]) Source #

rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2, x2, y2, z2, a3, b3, c3, d3) -> String Source #

rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2, x2, y2, z2, a3, b3, c3, d3) Source #

(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g, RawSql h, RawSql i, RawSql j, RawSql k, RawSql l, RawSql m, RawSql n, RawSql o, RawSql p, RawSql q, RawSql r, RawSql s, RawSql t, RawSql u, RawSql v, RawSql w, RawSql x, RawSql y, RawSql z, RawSql a2, RawSql b2, RawSql c2, RawSql d2, RawSql e2, RawSql f2, RawSql g2, RawSql h2, RawSql i2, RawSql j2, RawSql k2, RawSql l2, RawSql m2, RawSql n2, RawSql o2, RawSql p2, RawSql q2, RawSql r2, RawSql s2, RawSql t2, RawSql u2, RawSql v2, RawSql w2, RawSql x2, RawSql y2, RawSql z2, RawSql a3, RawSql b3, RawSql c3, RawSql d3, RawSql e3) => RawSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2, x2, y2, z2, a3, b3, c3, d3, e3) Source #

Since: 2.11.0

Instance details

Defined in Database.Persist.Sql.Class

Methods

rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2, x2, y2, z2, a3, b3, c3, d3, e3) -> (Int, [Text]) Source #

rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2, x2, y2, z2, a3, b3, c3, d3, e3) -> String Source #

rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2, x2, y2, z2, a3, b3, c3, d3, e3) Source #

(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g, RawSql h, RawSql i, RawSql j, RawSql k, RawSql l, RawSql m, RawSql n, RawSql o, RawSql p, RawSql q, RawSql r, RawSql s, RawSql t, RawSql u, RawSql v, RawSql w, RawSql x, RawSql y, RawSql z, RawSql a2, RawSql b2, RawSql c2, RawSql d2, RawSql e2, RawSql f2, RawSql g2, RawSql h2, RawSql i2, RawSql j2, RawSql k2, RawSql l2, RawSql m2, RawSql n2, RawSql o2, RawSql p2, RawSql q2, RawSql r2, RawSql s2, RawSql t2, RawSql u2, RawSql v2, RawSql w2, RawSql x2, RawSql y2, RawSql z2, RawSql a3, RawSql b3, RawSql c3, RawSql d3, RawSql e3, RawSql f3) => RawSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2, x2, y2, z2, a3, b3, c3, d3, e3, f3) Source #

Since: 2.11.0

Instance details

Defined in Database.Persist.Sql.Class

Methods

rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2, x2, y2, z2, a3, b3, c3, d3, e3, f3) -> (Int, [Text]) Source #

rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2, x2, y2, z2, a3, b3, c3, d3, e3, f3) -> String Source #

rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2, x2, y2, z2, a3, b3, c3, d3, e3, f3) Source #

(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g, RawSql h, RawSql i, RawSql j, RawSql k, RawSql l, RawSql m, RawSql n, RawSql o, RawSql p, RawSql q, RawSql r, RawSql s, RawSql t, RawSql u, RawSql v, RawSql w, RawSql x, RawSql y, RawSql z, RawSql a2, RawSql b2, RawSql c2, RawSql d2, RawSql e2, RawSql f2, RawSql g2, RawSql h2, RawSql i2, RawSql j2, RawSql k2, RawSql l2, RawSql m2, RawSql n2, RawSql o2, RawSql p2, RawSql q2, RawSql r2, RawSql s2, RawSql t2, RawSql u2, RawSql v2, RawSql w2, RawSql x2, RawSql y2, RawSql z2, RawSql a3, RawSql b3, RawSql c3, RawSql d3, RawSql e3, RawSql f3, RawSql g3) => RawSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2, x2, y2, z2, a3, b3, c3, d3, e3, f3, g3) Source #

Since: 2.11.0

Instance details

Defined in Database.Persist.Sql.Class

Methods

rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2, x2, y2, z2, a3, b3, c3, d3, e3, f3, g3) -> (Int, [Text]) Source #

rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2, x2, y2, z2, a3, b3, c3, d3, e3, f3, g3) -> String Source #

rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2, x2, y2, z2, a3, b3, c3, d3, e3, f3, g3) Source #

(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g, RawSql h, RawSql i, RawSql j, RawSql k, RawSql l, RawSql m, RawSql n, RawSql o, RawSql p, RawSql q, RawSql r, RawSql s, RawSql t, RawSql u, RawSql v, RawSql w, RawSql x, RawSql y, RawSql z, RawSql a2, RawSql b2, RawSql c2, RawSql d2, RawSql e2, RawSql f2, RawSql g2, RawSql h2, RawSql i2, RawSql j2, RawSql k2, RawSql l2, RawSql m2, RawSql n2, RawSql o2, RawSql p2, RawSql q2, RawSql r2, RawSql s2, RawSql t2, RawSql u2, RawSql v2, RawSql w2, RawSql x2, RawSql y2, RawSql z2, RawSql a3, RawSql b3, RawSql c3, RawSql d3, RawSql e3, RawSql f3, RawSql g3, RawSql h3) => RawSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2, x2, y2, z2, a3, b3, c3, d3, e3, f3, g3, h3) Source #

Since: 2.11.0

Instance details

Defined in Database.Persist.Sql.Class

Methods

rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2, x2, y2, z2, a3, b3, c3, d3, e3, f3, g3, h3) -> (Int, [Text]) Source #

rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2, x2, y2, z2, a3, b3, c3, d3, e3, f3, g3, h3) -> String Source #

rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2, x2, y2, z2, a3, b3, c3, d3, e3, f3, g3, h3) Source #

(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g, RawSql h, RawSql i, RawSql j, RawSql k, RawSql l, RawSql m, RawSql n, RawSql o, RawSql p, RawSql q, RawSql r, RawSql s, RawSql t, RawSql u, RawSql v, RawSql w, RawSql x, RawSql y, RawSql z, RawSql a2, RawSql b2, RawSql c2, RawSql d2, RawSql e2, RawSql f2, RawSql g2, RawSql h2, RawSql i2, RawSql j2, RawSql k2, RawSql l2, RawSql m2, RawSql n2, RawSql o2, RawSql p2, RawSql q2, RawSql r2, RawSql s2, RawSql t2, RawSql u2, RawSql v2, RawSql w2, RawSql x2, RawSql y2, RawSql z2, RawSql a3, RawSql b3, RawSql c3, RawSql d3, RawSql e3, RawSql f3, RawSql g3, RawSql h3, RawSql i3) => RawSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2, x2, y2, z2, a3, b3, c3, d3, e3, f3, g3, h3, i3) Source #

Since: 2.11.0

Instance details

Defined in Database.Persist.Sql.Class

Methods

rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2, x2, y2, z2, a3, b3, c3, d3, e3, f3, g3, h3, i3) -> (Int, [Text]) Source #

rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2, x2, y2, z2, a3, b3, c3, d3, e3, f3, g3, h3, i3) -> String Source #

rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2, x2, y2, z2, a3, b3, c3, d3, e3, f3, g3, h3, i3) Source #

(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g, RawSql h, RawSql i, RawSql j, RawSql k, RawSql l, RawSql m, RawSql n, RawSql o, RawSql p, RawSql q, RawSql r, RawSql s, RawSql t, RawSql u, RawSql v, RawSql w, RawSql x, RawSql y, RawSql z, RawSql a2, RawSql b2, RawSql c2, RawSql d2, RawSql e2, RawSql f2, RawSql g2, RawSql h2, RawSql i2, RawSql j2, RawSql k2, RawSql l2, RawSql m2, RawSql n2, RawSql o2, RawSql p2, RawSql q2, RawSql r2, RawSql s2, RawSql t2, RawSql u2, RawSql v2, RawSql w2, RawSql x2, RawSql y2, RawSql z2, RawSql a3, RawSql b3, RawSql c3, RawSql d3, RawSql e3, RawSql f3, RawSql g3, RawSql h3, RawSql i3, RawSql j3) => RawSql (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2, x2, y2, z2, a3, b3, c3, d3, e3, f3, g3, h3, i3, j3) Source #

Since: 2.11.0

Instance details

Defined in Database.Persist.Sql.Class

Methods

rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2, x2, y2, z2, a3, b3, c3, d3, e3, f3, g3, h3, i3, j3) -> (Int, [Text]) Source #

rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2, x2, y2, z2, a3, b3, c3, d3, e3, f3, g3, h3, i3, j3) -> String Source #

rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2, q2, r2, s2, t2, u2, v2, w2, x2, y2, z2, a3, b3, c3, d3, e3, f3, g3, h3, i3, j3) Source #

newtype EntityWithPrefix (prefix :: Symbol) record Source #

This newtype wrapper is useful when selecting an entity out of the database and you want to provide a prefix to the table being selected.

Consider this raw SQL query:

    SELECT ??
    FROM my_long_table_name AS mltn
    INNER JOIN other_table AS ot
       ON mltn.some_col = ot.other_col
    WHERE ...

We don't want to refer to `my_long_table_name` every time, so we create an alias. If we want to select it, we have to tell the raw SQL quasi-quoter that we expect the entity to be prefixed with some other name.

We can give the above query a type with this, like:

    getStuff :: SqlPersistM [EntityWithPrefix "mltn" MyLongTableName]
    getStuff = rawSql queryText []

The `EntityWithPrefix` bit is a boilerplate newtype wrapper, so you can remove it with `unPrefix`, like this:

    getStuff :: SqlPersistM [Entity MyLongTableName]
    getStuff = unPrefix @"mltn" <$> rawSql queryText []

The `symbol is a "type application" and requires the` TypeApplications@ language extension.

Since: 2.10.5

Constructors

EntityWithPrefix |

Fields

- unEntityWithPrefix :: Entity record

#### Instances

Instances details

(PersistEntity record, KnownSymbol prefix, PersistEntityBackend record ~ backend, IsPersistBackend backend) => RawSql (EntityWithPrefix prefix record) Source # |
Instance details Defined in Database.Persist.Sql.Class Methods rawSqlCols :: (Text -> Text) -> EntityWithPrefix prefix record -> (Int, [Text]) Source # rawSqlColCountReason :: EntityWithPrefix prefix record -> String Source # rawSqlProcessRow :: [PersistValue] -> Either Text (EntityWithPrefix prefix record) Source #

unPrefix :: forall (prefix :: Symbol) record. EntityWithPrefix prefix record -> Entity record Source #

A helper function to tell GHC what the `EntityWithPrefix` prefix should be. This allows you to use a type application to specify the prefix, instead of specifying the etype on the result.

As an example, here's code that uses this:

    myQuery :: SqlPersistM [Entity Person]
    myQuery = fmap (unPrefix @"p") $ rawSql query []
      where
        query = "SELECT ?? FROM person AS p"

Since: 2.10.5

# Running actions

Run actions in a transaction with `runSqlPool`.

runSqlPool :: forall backend m a. (MonadUnliftIO m, BackendCompatible SqlBackend backend) => ReaderT backend m a -> Pool backend -> m a Source #

Get a connection from the pool, run the given action, and then return the connection to the pool.

This function performs the given action in a transaction. If an exception occurs during the action, then the transaction is rolled back.

Note: This function previously timed out after 2 seconds, but this behavior was buggy and caused more problems than it solved. Since version 2.1.2, it performs no timeout checks.

runSqlConn :: forall backend m a. (MonadUnliftIO m, BackendCompatible SqlBackend backend) => ReaderT backend m a -> backend -> m a Source #

runSqlPoolWithIsolation :: forall backend m a. (MonadUnliftIO m, BackendCompatible SqlBackend backend) => ReaderT backend m a -> Pool backend -> IsolationLevel -> m a Source #

Like `runSqlPool`, but supports specifying an isolation level.

Since: 2.9.0

runSqlPoolNoTransaction :: forall backend m a. (MonadUnliftIO m, BackendCompatible SqlBackend backend) => ReaderT backend m a -> Pool backend -> Maybe IsolationLevel -> m a Source #

Like `runSqlPool`, but does not surround the action in a transaction. This action might leave your database in a weird state.

Since: 2.12.0.0

runSqlPoolWithHooks Source #

Arguments

:: forall backend m a before after onException. (MonadUnliftIO m, BackendCompatible SqlBackend backend) |
=> ReaderT backend m a |
-> Pool backend |
-> Maybe IsolationLevel |
-> (backend -> m before) | Run this action immediately before the action is performed.
-> (backend -> m after) | Run this action immediately after the action is completed.
-> (backend -> SomeException -> m onException) | This action is performed when an exception is received. The exception is provided as a convenience - it is rethrown once this cleanup function is complete.
-> m a |

This function is how `runSqlPool` and `runSqlPoolNoTransaction` are defined. In addition to the action to be performed and the `Pool` of conections to use, we give you the opportunity to provide three actions - initialize, afterwards, and onException.

Since: 2.12.0.0

runSqlPoolWithExtensibleHooks :: forall backend m a. (MonadUnliftIO m, BackendCompatible SqlBackend backend) => ReaderT backend m a -> Pool backend -> Maybe IsolationLevel -> SqlPoolHooks m backend -> m a Source #

This function is how `runSqlPoolWithHooks` is defined.

It's currently the most general function for using a SQL pool.

Since: 2.13.0.0

acquireSqlConn :: (MonadReader backend m, BackendCompatible SqlBackend backend) => m (Acquire backend) Source #

Starts a new transaction on the connection. When the acquired connection is released the transaction is committed and the connection returned to the pool.

Upon an exception the transaction is rolled back and the connection destroyed.

This is equivalent to `runSqlConn` but does not incur the `MonadUnliftIO` constraint, meaning it can be used within, for example, a `Conduit` pipeline.

Since: 2.10.5

acquireSqlConnWithIsolation :: (MonadReader backend m, BackendCompatible SqlBackend backend) => IsolationLevel -> m (Acquire backend) Source #

Like `acquireSqlConn`, but lets you specify an explicit isolation level.

Since: 2.10.5

runSqlConnWithIsolation :: forall backend m a. (MonadUnliftIO m, BackendCompatible SqlBackend backend) => ReaderT backend m a -> backend -> IsolationLevel -> m a Source #

Like `runSqlConn`, but supports specifying an isolation level.

Since: 2.9.0

runSqlPersistM :: BackendCompatible SqlBackend backend => ReaderT backend (NoLoggingT (ResourceT IO)) a -> backend -> IO a Source #

runSqlPersistMPool :: BackendCompatible SqlBackend backend => ReaderT backend (NoLoggingT (ResourceT IO)) a -> Pool backend -> IO a Source #

liftSqlPersistMPool :: forall backend m a. (MonadIO m, BackendCompatible SqlBackend backend) => ReaderT backend (NoLoggingT (ResourceT IO)) a -> Pool backend -> m a Source #

withSqlPool Source #

Arguments

:: forall backend m a. (MonadLoggerIO m, MonadUnliftIO m, BackendCompatible SqlBackend backend) |
=> (LogFunc -> IO backend) | create a new connection
-> Int | connection count
-> (Pool backend -> m a) |
-> m a |

withSqlPoolWithConfig Source #

Arguments

:: forall backend m a. (MonadLoggerIO m, MonadUnliftIO m, BackendCompatible SqlBackend backend) |
=> (LogFunc -> IO backend) | Function to create a new connection
-> ConnectionPoolConfig |
-> (Pool backend -> m a) |
-> m a |

Creates a pool of connections to a SQL database which can be used by the `Pool backend -> m a` function. After the function completes, the connections are destroyed.

Since: 2.11.0.0

createSqlPoolWithConfig Source #

Arguments

:: (MonadLoggerIO m, MonadUnliftIO m, BackendCompatible SqlBackend backend) |
=> (LogFunc -> IO backend) | Function to create a new connection
-> ConnectionPoolConfig |
-> m (Pool backend) |

Creates a pool of connections to a SQL database.

Since: 2.11.0.0

createSqlPool :: forall backend m. (MonadLoggerIO m, MonadUnliftIO m, BackendCompatible SqlBackend backend) => (LogFunc -> IO backend) -> Int -> m (Pool backend) Source #

close' :: BackendCompatible SqlBackend backend => backend -> IO () Source #

withSqlConn :: forall backend m a. (MonadUnliftIO m, MonadLoggerIO m, BackendCompatible SqlBackend backend) => (LogFunc -> IO backend) -> (backend -> m a) -> m a Source #

Create a connection and run sql queries within it. This function automatically closes the connection on it's completion.

### Example usage

Expand

    {-# LANGUAGE GADTs #-}
    {-# LANGUAGE ScopedTypeVariables #-}
    {-# LANGUAGE OverloadedStrings #-}
    {-# LANGUAGE MultiParamTypeClasses #-}
    {-# LANGUAGE TypeFamilies#-}
    {-# LANGUAGE TemplateHaskell#-}
    {-# LANGUAGE QuasiQuotes#-}
    {-# LANGUAGE GeneralizedNewtypeDeriving #-}

    import Control.Monad.IO.Class  (liftIO)
    import Control.Monad.Logger
    import Conduit
    import Database.Persist
    import Database.Sqlite
    import Database.Persist.Sqlite
    import Database.Persist.TH

    share [mkPersist sqlSettings, mkMigrate "migrateAll"] [persistLowerCase|
    Person
      name String
      age Int Maybe
      deriving Show
    |]

    openConnection :: LogFunc -> IO SqlBackend
    openConnection logfn = do
     conn <- open "/home/sibi/test.db"
     wrapConnection conn logfn

    main :: IO ()
    main = do
      runNoLoggingT $ runResourceT $ withSqlConn openConnection (\backend ->
                                          flip runSqlConn backend $ do
                                            runMigration migrateAll
                                            insert_ $ Person "John doe" $ Just 35
                                            insert_ $ Person "Divya" $ Just 36
                                            (pers :: [Entity Person]) <- selectList [] []
                                            liftIO $ print pers
                                            return ()
                                         )

On executing it, you get this output:

    Migrating: CREATE TABLE "person"("id" INTEGER PRIMARY KEY,"name" VARCHAR NOT NULL,"age" INTEGER NULL)
    [Entity {entityKey = PersonKey {unPersonKey = SqlBackendKey {unSqlBackendKey = 1}}, entityVal = Person {personName = "John doe", personAge = Just 35}},Entity {entityKey = PersonKey {unPersonKey = SqlBackendKey {unSqlBackendKey = 2}}, entityVal = Person {personName = "Hema", personAge = Just 36}}]

# Migrations

module Database.Persist.Sql.Migration

# `persistent` combinators

We re-export Database.Persist here, to make it easier to use query and update combinators. Check out that module for documentation.

module Database.Persist

data family BackendKey backend Source #

#### Instances

Instances details

(BackendCompatible b s, FromJSON (BackendKey b)) => FromJSON (BackendKey (Compatible b s)) Source # |
Instance details Defined in Database.Persist.Compatible.Types Methods parseJSON :: Value -> Parser (BackendKey (Compatible b s)) Source # parseJSONList :: Value -> Parser [BackendKey (Compatible b s)] Source # omittedField :: Maybe (BackendKey (Compatible b s)) Source #
FromJSON (BackendKey SqlReadBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods parseJSON :: Value -> Parser (BackendKey SqlReadBackend) Source # parseJSONList :: Value -> Parser [BackendKey SqlReadBackend] Source # omittedField :: Maybe (BackendKey SqlReadBackend) Source #
FromJSON (BackendKey SqlWriteBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods parseJSON :: Value -> Parser (BackendKey SqlWriteBackend) Source # parseJSONList :: Value -> Parser [BackendKey SqlWriteBackend] Source # omittedField :: Maybe (BackendKey SqlWriteBackend) Source #
FromJSON (BackendKey SqlBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods parseJSON :: Value -> Parser (BackendKey SqlBackend) Source # parseJSONList :: Value -> Parser [BackendKey SqlBackend] Source # omittedField :: Maybe (BackendKey SqlBackend) Source #
(BackendCompatible b s, ToJSON (BackendKey b)) => ToJSON (BackendKey (Compatible b s)) Source # |
Instance details Defined in Database.Persist.Compatible.Types Methods toJSON :: BackendKey (Compatible b s) -> Value Source # toEncoding :: BackendKey (Compatible b s) -> Encoding Source # toJSONList :: [BackendKey (Compatible b s)] -> Value Source # toEncodingList :: [BackendKey (Compatible b s)] -> Encoding Source # omitField :: BackendKey (Compatible b s) -> Bool Source #
ToJSON (BackendKey SqlReadBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods toJSON :: BackendKey SqlReadBackend -> Value Source # toEncoding :: BackendKey SqlReadBackend -> Encoding Source # toJSONList :: [BackendKey SqlReadBackend] -> Value Source # toEncodingList :: [BackendKey SqlReadBackend] -> Encoding Source # omitField :: BackendKey SqlReadBackend -> Bool Source #
ToJSON (BackendKey SqlWriteBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods toJSON :: BackendKey SqlWriteBackend -> Value Source # toEncoding :: BackendKey SqlWriteBackend -> Encoding Source # toJSONList :: [BackendKey SqlWriteBackend] -> Value Source # toEncodingList :: [BackendKey SqlWriteBackend] -> Encoding Source # omitField :: BackendKey SqlWriteBackend -> Bool Source #
ToJSON (BackendKey SqlBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods toJSON :: BackendKey SqlBackend -> Value Source # toEncoding :: BackendKey SqlBackend -> Encoding Source # toJSONList :: [BackendKey SqlBackend] -> Value Source # toEncodingList :: [BackendKey SqlBackend] -> Encoding Source # omitField :: BackendKey SqlBackend -> Bool Source #
(BackendCompatible b s, Bounded (BackendKey b)) => Bounded (BackendKey (Compatible b s)) Source # |
Instance details Defined in Database.Persist.Compatible.Types Methods minBound :: BackendKey (Compatible b s) Source # maxBound :: BackendKey (Compatible b s) Source #
Bounded (BackendKey SqlReadBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods minBound :: BackendKey SqlReadBackend Source # maxBound :: BackendKey SqlReadBackend Source #
Bounded (BackendKey SqlWriteBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods minBound :: BackendKey SqlWriteBackend Source # maxBound :: BackendKey SqlWriteBackend Source #
Bounded (BackendKey SqlBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods minBound :: BackendKey SqlBackend Source # maxBound :: BackendKey SqlBackend Source #
(BackendCompatible b s, Enum (BackendKey b)) => Enum (BackendKey (Compatible b s)) Source # |

Instance details

Defined in Database.Persist.Compatible.Types

Methods

succ :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) Source #

pred :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) Source #

toEnum :: Int -> BackendKey (Compatible b s) Source #

fromEnum :: BackendKey (Compatible b s) -> Int Source #

enumFrom :: BackendKey (Compatible b s) -> [BackendKey (Compatible b s)] Source #

enumFromThen :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> [BackendKey (Compatible b s)] Source #

enumFromTo :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> [BackendKey (Compatible b s)] Source #

enumFromThenTo :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> [BackendKey (Compatible b s)] Source #

Enum (BackendKey SqlReadBackend) Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

Methods

succ :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend Source #

pred :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend Source #

toEnum :: Int -> BackendKey SqlReadBackend Source #

fromEnum :: BackendKey SqlReadBackend -> Int Source #

enumFrom :: BackendKey SqlReadBackend -> [BackendKey SqlReadBackend] Source #

enumFromThen :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> [BackendKey SqlReadBackend] Source #

enumFromTo :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> [BackendKey SqlReadBackend] Source #

enumFromThenTo :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> [BackendKey SqlReadBackend] Source #

Enum (BackendKey SqlWriteBackend) Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

Methods

succ :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend Source #

pred :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend Source #

toEnum :: Int -> BackendKey SqlWriteBackend Source #

fromEnum :: BackendKey SqlWriteBackend -> Int Source #

enumFrom :: BackendKey SqlWriteBackend -> [BackendKey SqlWriteBackend] Source #

enumFromThen :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> [BackendKey SqlWriteBackend] Source #

enumFromTo :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> [BackendKey SqlWriteBackend] Source #

enumFromThenTo :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> [BackendKey SqlWriteBackend] Source #

Enum (BackendKey SqlBackend) Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

Methods

succ :: BackendKey SqlBackend -> BackendKey SqlBackend Source #

pred :: BackendKey SqlBackend -> BackendKey SqlBackend Source #

toEnum :: Int -> BackendKey SqlBackend Source #

fromEnum :: BackendKey SqlBackend -> Int Source #

enumFrom :: BackendKey SqlBackend -> [BackendKey SqlBackend] Source #

enumFromThen :: BackendKey SqlBackend -> BackendKey SqlBackend -> [BackendKey SqlBackend] Source #

enumFromTo :: BackendKey SqlBackend -> BackendKey SqlBackend -> [BackendKey SqlBackend] Source #

enumFromThenTo :: BackendKey SqlBackend -> BackendKey SqlBackend -> BackendKey SqlBackend -> [BackendKey SqlBackend] Source #

Generic (BackendKey SqlReadBackend) Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

Associated Types

type Rep (BackendKey SqlReadBackend) |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore type Rep (BackendKey SqlReadBackend) = D1 ('MetaData "BackendKey" "Database.Persist.Sql.Orphan.PersistStore" "persistent-2.17.1.0-EQFFjlejpWP10lX0h8hkWO" 'True) (C1 ('MetaCons "SqlReadBackendKey" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSqlReadBackendKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int64)))

Methods

from :: BackendKey SqlReadBackend -> Rep (BackendKey SqlReadBackend) x Source #

to :: Rep (BackendKey SqlReadBackend) x -> BackendKey SqlReadBackend Source #

Generic (BackendKey SqlWriteBackend) Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

Associated Types

type Rep (BackendKey SqlWriteBackend) |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore type Rep (BackendKey SqlWriteBackend) = D1 ('MetaData "BackendKey" "Database.Persist.Sql.Orphan.PersistStore" "persistent-2.17.1.0-EQFFjlejpWP10lX0h8hkWO" 'True) (C1 ('MetaCons "SqlWriteBackendKey" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSqlWriteBackendKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int64)))

Methods

from :: BackendKey SqlWriteBackend -> Rep (BackendKey SqlWriteBackend) x Source #

to :: Rep (BackendKey SqlWriteBackend) x -> BackendKey SqlWriteBackend Source #

Generic (BackendKey SqlBackend) Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

Associated Types

type Rep (BackendKey SqlBackend) |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore type Rep (BackendKey SqlBackend) = D1 ('MetaData "BackendKey" "Database.Persist.Sql.Orphan.PersistStore" "persistent-2.17.1.0-EQFFjlejpWP10lX0h8hkWO" 'True) (C1 ('MetaCons "SqlBackendKey" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSqlBackendKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int64)))

Methods

from :: BackendKey SqlBackend -> Rep (BackendKey SqlBackend) x Source #

to :: Rep (BackendKey SqlBackend) x -> BackendKey SqlBackend Source #

(BackendCompatible b s, Num (BackendKey b)) => Num (BackendKey (Compatible b s)) Source # |

Instance details

Defined in Database.Persist.Compatible.Types

Methods

(+) :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> BackendKey (Compatible b s) Source #

(-) :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> BackendKey (Compatible b s) Source #

(*) :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> BackendKey (Compatible b s) Source #

negate :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) Source #

abs :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) Source #

signum :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) Source #

fromInteger :: Integer -> BackendKey (Compatible b s) Source #

Num (BackendKey SqlReadBackend) Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

Methods

(+) :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> BackendKey SqlReadBackend Source #

(-) :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> BackendKey SqlReadBackend Source #

(*) :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> BackendKey SqlReadBackend Source #

negate :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend Source #

abs :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend Source #

signum :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend Source #

fromInteger :: Integer -> BackendKey SqlReadBackend Source #

Num (BackendKey SqlWriteBackend) Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

Methods

(+) :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend Source #

(-) :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend Source #

(*) :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend Source #

negate :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend Source #

abs :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend Source #

signum :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend Source #

fromInteger :: Integer -> BackendKey SqlWriteBackend Source #

Num (BackendKey SqlBackend) Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

Methods

(+) :: BackendKey SqlBackend -> BackendKey SqlBackend -> BackendKey SqlBackend Source #

(-) :: BackendKey SqlBackend -> BackendKey SqlBackend -> BackendKey SqlBackend Source #

(*) :: BackendKey SqlBackend -> BackendKey SqlBackend -> BackendKey SqlBackend Source #

negate :: BackendKey SqlBackend -> BackendKey SqlBackend Source #

abs :: BackendKey SqlBackend -> BackendKey SqlBackend Source #

signum :: BackendKey SqlBackend -> BackendKey SqlBackend Source #

fromInteger :: Integer -> BackendKey SqlBackend Source #

(BackendCompatible b s, Read (BackendKey b)) => Read (BackendKey (Compatible b s)) Source # |
Instance details Defined in Database.Persist.Compatible.Types Methods readsPrec :: Int -> ReadS (BackendKey (Compatible b s)) Source # readList :: ReadS [BackendKey (Compatible b s)] Source # readPrec :: ReadPrec (BackendKey (Compatible b s)) Source # readListPrec :: ReadPrec [BackendKey (Compatible b s)] Source #
Read (BackendKey SqlReadBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods readsPrec :: Int -> ReadS (BackendKey SqlReadBackend) Source # readList :: ReadS [BackendKey SqlReadBackend] Source # readPrec :: ReadPrec (BackendKey SqlReadBackend) Source # readListPrec :: ReadPrec [BackendKey SqlReadBackend] Source #
Read (BackendKey SqlWriteBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods readsPrec :: Int -> ReadS (BackendKey SqlWriteBackend) Source # readList :: ReadS [BackendKey SqlWriteBackend] Source # readPrec :: ReadPrec (BackendKey SqlWriteBackend) Source # readListPrec :: ReadPrec [BackendKey SqlWriteBackend] Source #
Read (BackendKey SqlBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods readsPrec :: Int -> ReadS (BackendKey SqlBackend) Source # readList :: ReadS [BackendKey SqlBackend] Source # readPrec :: ReadPrec (BackendKey SqlBackend) Source # readListPrec :: ReadPrec [BackendKey SqlBackend] Source #
(BackendCompatible b s, Integral (BackendKey b)) => Integral (BackendKey (Compatible b s)) Source # |

Instance details

Defined in Database.Persist.Compatible.Types

Methods

quot :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> BackendKey (Compatible b s) Source #

rem :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> BackendKey (Compatible b s) Source #

div :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> BackendKey (Compatible b s) Source #

mod :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> BackendKey (Compatible b s) Source #

quotRem :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> (BackendKey (Compatible b s), BackendKey (Compatible b s)) Source #

divMod :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> (BackendKey (Compatible b s), BackendKey (Compatible b s)) Source #

toInteger :: BackendKey (Compatible b s) -> Integer Source #

Integral (BackendKey SqlReadBackend) Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

Methods

quot :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> BackendKey SqlReadBackend Source #

rem :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> BackendKey SqlReadBackend Source #

div :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> BackendKey SqlReadBackend Source #

mod :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> BackendKey SqlReadBackend Source #

quotRem :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> (BackendKey SqlReadBackend, BackendKey SqlReadBackend) Source #

divMod :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> (BackendKey SqlReadBackend, BackendKey SqlReadBackend) Source #

toInteger :: BackendKey SqlReadBackend -> Integer Source #

Integral (BackendKey SqlWriteBackend) Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

Methods

quot :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend Source #

rem :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend Source #

div :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend Source #

mod :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend Source #

quotRem :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> (BackendKey SqlWriteBackend, BackendKey SqlWriteBackend) Source #

divMod :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> (BackendKey SqlWriteBackend, BackendKey SqlWriteBackend) Source #

toInteger :: BackendKey SqlWriteBackend -> Integer Source #

Integral (BackendKey SqlBackend) Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

Methods

quot :: BackendKey SqlBackend -> BackendKey SqlBackend -> BackendKey SqlBackend Source #

rem :: BackendKey SqlBackend -> BackendKey SqlBackend -> BackendKey SqlBackend Source #

div :: BackendKey SqlBackend -> BackendKey SqlBackend -> BackendKey SqlBackend Source #

mod :: BackendKey SqlBackend -> BackendKey SqlBackend -> BackendKey SqlBackend Source #

quotRem :: BackendKey SqlBackend -> BackendKey SqlBackend -> (BackendKey SqlBackend, BackendKey SqlBackend) Source #

divMod :: BackendKey SqlBackend -> BackendKey SqlBackend -> (BackendKey SqlBackend, BackendKey SqlBackend) Source #

toInteger :: BackendKey SqlBackend -> Integer Source #

(BackendCompatible b s, Real (BackendKey b)) => Real (BackendKey (Compatible b s)) Source # |
Instance details Defined in Database.Persist.Compatible.Types Methods toRational :: BackendKey (Compatible b s) -> Rational Source #
Real (BackendKey SqlReadBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods toRational :: BackendKey SqlReadBackend -> Rational Source #
Real (BackendKey SqlWriteBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods toRational :: BackendKey SqlWriteBackend -> Rational Source #
Real (BackendKey SqlBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods toRational :: BackendKey SqlBackend -> Rational Source #
(BackendCompatible b s, Show (BackendKey b)) => Show (BackendKey (Compatible b s)) Source # |
Instance details Defined in Database.Persist.Compatible.Types Methods showsPrec :: Int -> BackendKey (Compatible b s) -> ShowS Source # show :: BackendKey (Compatible b s) -> String Source # showList :: [BackendKey (Compatible b s)] -> ShowS Source #
Show (BackendKey SqlReadBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods showsPrec :: Int -> BackendKey SqlReadBackend -> ShowS Source # show :: BackendKey SqlReadBackend -> String Source # showList :: [BackendKey SqlReadBackend] -> ShowS Source #
Show (BackendKey SqlWriteBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods showsPrec :: Int -> BackendKey SqlWriteBackend -> ShowS Source # show :: BackendKey SqlWriteBackend -> String Source # showList :: [BackendKey SqlWriteBackend] -> ShowS Source #
Show (BackendKey SqlBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods showsPrec :: Int -> BackendKey SqlBackend -> ShowS Source # show :: BackendKey SqlBackend -> String Source # showList :: [BackendKey SqlBackend] -> ShowS Source #
(BackendCompatible b s, Eq (BackendKey b)) => Eq (BackendKey (Compatible b s)) Source # |
Instance details Defined in Database.Persist.Compatible.Types Methods (==) :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> Bool Source # (/=) :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> Bool Source #
Eq (BackendKey SqlReadBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods (==) :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> Bool Source # (/=) :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> Bool Source #
Eq (BackendKey SqlWriteBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods (==) :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> Bool Source # (/=) :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> Bool Source #
Eq (BackendKey SqlBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods (==) :: BackendKey SqlBackend -> BackendKey SqlBackend -> Bool Source # (/=) :: BackendKey SqlBackend -> BackendKey SqlBackend -> Bool Source #
(BackendCompatible b s, Ord (BackendKey b)) => Ord (BackendKey (Compatible b s)) Source # |

Instance details

Defined in Database.Persist.Compatible.Types

Methods

compare :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> Ordering Source #

(<) :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> Bool Source #

(<=) :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> Bool Source #

(>) :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> Bool Source #

(>=) :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> Bool Source #

max :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> BackendKey (Compatible b s) Source #

min :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> BackendKey (Compatible b s) Source #

Ord (BackendKey SqlReadBackend) Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

Methods

compare :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> Ordering Source #

(<) :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> Bool Source #

(<=) :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> Bool Source #

(>) :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> Bool Source #

(>=) :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> Bool Source #

max :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> BackendKey SqlReadBackend Source #

min :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> BackendKey SqlReadBackend Source #

Ord (BackendKey SqlWriteBackend) Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

Methods

compare :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> Ordering Source #

(<) :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> Bool Source #

(<=) :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> Bool Source #

(>) :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> Bool Source #

(>=) :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> Bool Source #

max :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend Source #

min :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend Source #

Ord (BackendKey SqlBackend) Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

Methods

compare :: BackendKey SqlBackend -> BackendKey SqlBackend -> Ordering Source #

(<) :: BackendKey SqlBackend -> BackendKey SqlBackend -> Bool Source #

(<=) :: BackendKey SqlBackend -> BackendKey SqlBackend -> Bool Source #

(>) :: BackendKey SqlBackend -> BackendKey SqlBackend -> Bool Source #

(>=) :: BackendKey SqlBackend -> BackendKey SqlBackend -> Bool Source #

max :: BackendKey SqlBackend -> BackendKey SqlBackend -> BackendKey SqlBackend Source #

min :: BackendKey SqlBackend -> BackendKey SqlBackend -> BackendKey SqlBackend Source #

FromHttpApiData (BackendKey SqlReadBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods parseUrlPiece :: Text -> Either Text (BackendKey SqlReadBackend) Source # parseHeader :: ByteString -> Either Text (BackendKey SqlReadBackend) Source # parseQueryParam :: Text -> Either Text (BackendKey SqlReadBackend) Source #
FromHttpApiData (BackendKey SqlWriteBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods parseUrlPiece :: Text -> Either Text (BackendKey SqlWriteBackend) Source # parseHeader :: ByteString -> Either Text (BackendKey SqlWriteBackend) Source # parseQueryParam :: Text -> Either Text (BackendKey SqlWriteBackend) Source #
FromHttpApiData (BackendKey SqlBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods parseUrlPiece :: Text -> Either Text (BackendKey SqlBackend) Source # parseHeader :: ByteString -> Either Text (BackendKey SqlBackend) Source # parseQueryParam :: Text -> Either Text (BackendKey SqlBackend) Source #
ToHttpApiData (BackendKey SqlReadBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods toUrlPiece :: BackendKey SqlReadBackend -> Text Source # toEncodedUrlPiece :: BackendKey SqlReadBackend -> Builder Source # toHeader :: BackendKey SqlReadBackend -> ByteString Source # toQueryParam :: BackendKey SqlReadBackend -> Text Source # toEncodedQueryParam :: BackendKey SqlReadBackend -> Builder Source #
ToHttpApiData (BackendKey SqlWriteBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods toUrlPiece :: BackendKey SqlWriteBackend -> Text Source # toEncodedUrlPiece :: BackendKey SqlWriteBackend -> Builder Source # toHeader :: BackendKey SqlWriteBackend -> ByteString Source # toQueryParam :: BackendKey SqlWriteBackend -> Text Source # toEncodedQueryParam :: BackendKey SqlWriteBackend -> Builder Source #
ToHttpApiData (BackendKey SqlBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods toUrlPiece :: BackendKey SqlBackend -> Text Source # toEncodedUrlPiece :: BackendKey SqlBackend -> Builder Source # toHeader :: BackendKey SqlBackend -> ByteString Source # toQueryParam :: BackendKey SqlBackend -> Text Source # toEncodedQueryParam :: BackendKey SqlBackend -> Builder Source #
PathPiece (BackendKey SqlReadBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods fromPathPiece :: Text -> Maybe (BackendKey SqlReadBackend) Source # toPathPiece :: BackendKey SqlReadBackend -> Text Source #
PathPiece (BackendKey SqlWriteBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods fromPathPiece :: Text -> Maybe (BackendKey SqlWriteBackend) Source # toPathPiece :: BackendKey SqlWriteBackend -> Text Source #
PathPiece (BackendKey SqlBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods fromPathPiece :: Text -> Maybe (BackendKey SqlBackend) Source # toPathPiece :: BackendKey SqlBackend -> Text Source #
(BackendCompatible b s, PersistField (BackendKey b)) => PersistField (BackendKey (Compatible b s)) Source # |
Instance details Defined in Database.Persist.Compatible.Types Methods toPersistValue :: BackendKey (Compatible b s) -> PersistValue Source # fromPersistValue :: PersistValue -> Either Text (BackendKey (Compatible b s)) Source #
PersistField (BackendKey SqlReadBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods toPersistValue :: BackendKey SqlReadBackend -> PersistValue Source # fromPersistValue :: PersistValue -> Either Text (BackendKey SqlReadBackend) Source #
PersistField (BackendKey SqlWriteBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods toPersistValue :: BackendKey SqlWriteBackend -> PersistValue Source # fromPersistValue :: PersistValue -> Either Text (BackendKey SqlWriteBackend) Source #
PersistField (BackendKey SqlBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods toPersistValue :: BackendKey SqlBackend -> PersistValue Source # fromPersistValue :: PersistValue -> Either Text (BackendKey SqlBackend) Source #
(BackendCompatible b s, PersistFieldSql (BackendKey b)) => PersistFieldSql (BackendKey (Compatible b s)) Source # |
Instance details Defined in Database.Persist.Compatible.Types Methods sqlType :: Proxy (BackendKey (Compatible b s)) -> SqlType Source #
PersistFieldSql (BackendKey SqlReadBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods sqlType :: Proxy (BackendKey SqlReadBackend) -> SqlType Source #
PersistFieldSql (BackendKey SqlWriteBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods sqlType :: Proxy (BackendKey SqlWriteBackend) -> SqlType Source #
PersistFieldSql (BackendKey SqlBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods sqlType :: Proxy (BackendKey SqlBackend) -> SqlType Source #
newtype BackendKey SqlReadBackend Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

newtype BackendKey SqlReadBackend = SqlReadBackendKey {

- unSqlReadBackendKey :: Int64

}

newtype BackendKey SqlWriteBackend Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

newtype BackendKey SqlWriteBackend = SqlWriteBackendKey {

- unSqlWriteBackendKey :: Int64

}

newtype BackendKey SqlBackend Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

newtype BackendKey SqlBackend = SqlBackendKey {

- unSqlBackendKey :: Int64

}

type Rep (BackendKey SqlReadBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore type Rep (BackendKey SqlReadBackend) = D1 ('MetaData "BackendKey" "Database.Persist.Sql.Orphan.PersistStore" "persistent-2.17.1.0-EQFFjlejpWP10lX0h8hkWO" 'True) (C1 ('MetaCons "SqlReadBackendKey" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSqlReadBackendKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int64)))
type Rep (BackendKey SqlWriteBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore type Rep (BackendKey SqlWriteBackend) = D1 ('MetaData "BackendKey" "Database.Persist.Sql.Orphan.PersistStore" "persistent-2.17.1.0-EQFFjlejpWP10lX0h8hkWO" 'True) (C1 ('MetaCons "SqlWriteBackendKey" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSqlWriteBackendKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int64)))
type Rep (BackendKey SqlBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore type Rep (BackendKey SqlBackend) = D1 ('MetaData "BackendKey" "Database.Persist.Sql.Orphan.PersistStore" "persistent-2.17.1.0-EQFFjlejpWP10lX0h8hkWO" 'True) (C1 ('MetaCons "SqlBackendKey" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSqlBackendKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int64)))
newtype BackendKey (Compatible b s) Source # |

Instance details

Defined in Database.Persist.Compatible.Types

newtype BackendKey (Compatible b s) = CompatibleKey {

- unCompatibleKey :: BackendKey b

}

data family BackendKey backend Source #

#### Instances

Instances details

(BackendCompatible b s, FromJSON (BackendKey b)) => FromJSON (BackendKey (Compatible b s)) Source # |
Instance details Defined in Database.Persist.Compatible.Types Methods parseJSON :: Value -> Parser (BackendKey (Compatible b s)) Source # parseJSONList :: Value -> Parser [BackendKey (Compatible b s)] Source # omittedField :: Maybe (BackendKey (Compatible b s)) Source #
FromJSON (BackendKey SqlReadBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods parseJSON :: Value -> Parser (BackendKey SqlReadBackend) Source # parseJSONList :: Value -> Parser [BackendKey SqlReadBackend] Source # omittedField :: Maybe (BackendKey SqlReadBackend) Source #
FromJSON (BackendKey SqlWriteBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods parseJSON :: Value -> Parser (BackendKey SqlWriteBackend) Source # parseJSONList :: Value -> Parser [BackendKey SqlWriteBackend] Source # omittedField :: Maybe (BackendKey SqlWriteBackend) Source #
FromJSON (BackendKey SqlBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods parseJSON :: Value -> Parser (BackendKey SqlBackend) Source # parseJSONList :: Value -> Parser [BackendKey SqlBackend] Source # omittedField :: Maybe (BackendKey SqlBackend) Source #
(BackendCompatible b s, ToJSON (BackendKey b)) => ToJSON (BackendKey (Compatible b s)) Source # |
Instance details Defined in Database.Persist.Compatible.Types Methods toJSON :: BackendKey (Compatible b s) -> Value Source # toEncoding :: BackendKey (Compatible b s) -> Encoding Source # toJSONList :: [BackendKey (Compatible b s)] -> Value Source # toEncodingList :: [BackendKey (Compatible b s)] -> Encoding Source # omitField :: BackendKey (Compatible b s) -> Bool Source #
ToJSON (BackendKey SqlReadBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods toJSON :: BackendKey SqlReadBackend -> Value Source # toEncoding :: BackendKey SqlReadBackend -> Encoding Source # toJSONList :: [BackendKey SqlReadBackend] -> Value Source # toEncodingList :: [BackendKey SqlReadBackend] -> Encoding Source # omitField :: BackendKey SqlReadBackend -> Bool Source #
ToJSON (BackendKey SqlWriteBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods toJSON :: BackendKey SqlWriteBackend -> Value Source # toEncoding :: BackendKey SqlWriteBackend -> Encoding Source # toJSONList :: [BackendKey SqlWriteBackend] -> Value Source # toEncodingList :: [BackendKey SqlWriteBackend] -> Encoding Source # omitField :: BackendKey SqlWriteBackend -> Bool Source #
ToJSON (BackendKey SqlBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods toJSON :: BackendKey SqlBackend -> Value Source # toEncoding :: BackendKey SqlBackend -> Encoding Source # toJSONList :: [BackendKey SqlBackend] -> Value Source # toEncodingList :: [BackendKey SqlBackend] -> Encoding Source # omitField :: BackendKey SqlBackend -> Bool Source #
(BackendCompatible b s, Bounded (BackendKey b)) => Bounded (BackendKey (Compatible b s)) Source # |
Instance details Defined in Database.Persist.Compatible.Types Methods minBound :: BackendKey (Compatible b s) Source # maxBound :: BackendKey (Compatible b s) Source #
Bounded (BackendKey SqlReadBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods minBound :: BackendKey SqlReadBackend Source # maxBound :: BackendKey SqlReadBackend Source #
Bounded (BackendKey SqlWriteBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods minBound :: BackendKey SqlWriteBackend Source # maxBound :: BackendKey SqlWriteBackend Source #
Bounded (BackendKey SqlBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods minBound :: BackendKey SqlBackend Source # maxBound :: BackendKey SqlBackend Source #
(BackendCompatible b s, Enum (BackendKey b)) => Enum (BackendKey (Compatible b s)) Source # |

Instance details

Defined in Database.Persist.Compatible.Types

Methods

succ :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) Source #

pred :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) Source #

toEnum :: Int -> BackendKey (Compatible b s) Source #

fromEnum :: BackendKey (Compatible b s) -> Int Source #

enumFrom :: BackendKey (Compatible b s) -> [BackendKey (Compatible b s)] Source #

enumFromThen :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> [BackendKey (Compatible b s)] Source #

enumFromTo :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> [BackendKey (Compatible b s)] Source #

enumFromThenTo :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> [BackendKey (Compatible b s)] Source #

Enum (BackendKey SqlReadBackend) Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

Methods

succ :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend Source #

pred :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend Source #

toEnum :: Int -> BackendKey SqlReadBackend Source #

fromEnum :: BackendKey SqlReadBackend -> Int Source #

enumFrom :: BackendKey SqlReadBackend -> [BackendKey SqlReadBackend] Source #

enumFromThen :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> [BackendKey SqlReadBackend] Source #

enumFromTo :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> [BackendKey SqlReadBackend] Source #

enumFromThenTo :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> [BackendKey SqlReadBackend] Source #

Enum (BackendKey SqlWriteBackend) Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

Methods

succ :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend Source #

pred :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend Source #

toEnum :: Int -> BackendKey SqlWriteBackend Source #

fromEnum :: BackendKey SqlWriteBackend -> Int Source #

enumFrom :: BackendKey SqlWriteBackend -> [BackendKey SqlWriteBackend] Source #

enumFromThen :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> [BackendKey SqlWriteBackend] Source #

enumFromTo :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> [BackendKey SqlWriteBackend] Source #

enumFromThenTo :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> [BackendKey SqlWriteBackend] Source #

Enum (BackendKey SqlBackend) Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

Methods

succ :: BackendKey SqlBackend -> BackendKey SqlBackend Source #

pred :: BackendKey SqlBackend -> BackendKey SqlBackend Source #

toEnum :: Int -> BackendKey SqlBackend Source #

fromEnum :: BackendKey SqlBackend -> Int Source #

enumFrom :: BackendKey SqlBackend -> [BackendKey SqlBackend] Source #

enumFromThen :: BackendKey SqlBackend -> BackendKey SqlBackend -> [BackendKey SqlBackend] Source #

enumFromTo :: BackendKey SqlBackend -> BackendKey SqlBackend -> [BackendKey SqlBackend] Source #

enumFromThenTo :: BackendKey SqlBackend -> BackendKey SqlBackend -> BackendKey SqlBackend -> [BackendKey SqlBackend] Source #

Generic (BackendKey SqlReadBackend) Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

Associated Types

type Rep (BackendKey SqlReadBackend) |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore type Rep (BackendKey SqlReadBackend) = D1 ('MetaData "BackendKey" "Database.Persist.Sql.Orphan.PersistStore" "persistent-2.17.1.0-EQFFjlejpWP10lX0h8hkWO" 'True) (C1 ('MetaCons "SqlReadBackendKey" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSqlReadBackendKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int64)))

Methods

from :: BackendKey SqlReadBackend -> Rep (BackendKey SqlReadBackend) x Source #

to :: Rep (BackendKey SqlReadBackend) x -> BackendKey SqlReadBackend Source #

Generic (BackendKey SqlWriteBackend) Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

Associated Types

type Rep (BackendKey SqlWriteBackend) |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore type Rep (BackendKey SqlWriteBackend) = D1 ('MetaData "BackendKey" "Database.Persist.Sql.Orphan.PersistStore" "persistent-2.17.1.0-EQFFjlejpWP10lX0h8hkWO" 'True) (C1 ('MetaCons "SqlWriteBackendKey" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSqlWriteBackendKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int64)))

Methods

from :: BackendKey SqlWriteBackend -> Rep (BackendKey SqlWriteBackend) x Source #

to :: Rep (BackendKey SqlWriteBackend) x -> BackendKey SqlWriteBackend Source #

Generic (BackendKey SqlBackend) Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

Associated Types

type Rep (BackendKey SqlBackend) |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore type Rep (BackendKey SqlBackend) = D1 ('MetaData "BackendKey" "Database.Persist.Sql.Orphan.PersistStore" "persistent-2.17.1.0-EQFFjlejpWP10lX0h8hkWO" 'True) (C1 ('MetaCons "SqlBackendKey" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSqlBackendKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int64)))

Methods

from :: BackendKey SqlBackend -> Rep (BackendKey SqlBackend) x Source #

to :: Rep (BackendKey SqlBackend) x -> BackendKey SqlBackend Source #

(BackendCompatible b s, Num (BackendKey b)) => Num (BackendKey (Compatible b s)) Source # |

Instance details

Defined in Database.Persist.Compatible.Types

Methods

(+) :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> BackendKey (Compatible b s) Source #

(-) :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> BackendKey (Compatible b s) Source #

(*) :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> BackendKey (Compatible b s) Source #

negate :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) Source #

abs :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) Source #

signum :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) Source #

fromInteger :: Integer -> BackendKey (Compatible b s) Source #

Num (BackendKey SqlReadBackend) Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

Methods

(+) :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> BackendKey SqlReadBackend Source #

(-) :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> BackendKey SqlReadBackend Source #

(*) :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> BackendKey SqlReadBackend Source #

negate :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend Source #

abs :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend Source #

signum :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend Source #

fromInteger :: Integer -> BackendKey SqlReadBackend Source #

Num (BackendKey SqlWriteBackend) Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

Methods

(+) :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend Source #

(-) :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend Source #

(*) :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend Source #

negate :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend Source #

abs :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend Source #

signum :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend Source #

fromInteger :: Integer -> BackendKey SqlWriteBackend Source #

Num (BackendKey SqlBackend) Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

Methods

(+) :: BackendKey SqlBackend -> BackendKey SqlBackend -> BackendKey SqlBackend Source #

(-) :: BackendKey SqlBackend -> BackendKey SqlBackend -> BackendKey SqlBackend Source #

(*) :: BackendKey SqlBackend -> BackendKey SqlBackend -> BackendKey SqlBackend Source #

negate :: BackendKey SqlBackend -> BackendKey SqlBackend Source #

abs :: BackendKey SqlBackend -> BackendKey SqlBackend Source #

signum :: BackendKey SqlBackend -> BackendKey SqlBackend Source #

fromInteger :: Integer -> BackendKey SqlBackend Source #

(BackendCompatible b s, Read (BackendKey b)) => Read (BackendKey (Compatible b s)) Source # |
Instance details Defined in Database.Persist.Compatible.Types Methods readsPrec :: Int -> ReadS (BackendKey (Compatible b s)) Source # readList :: ReadS [BackendKey (Compatible b s)] Source # readPrec :: ReadPrec (BackendKey (Compatible b s)) Source # readListPrec :: ReadPrec [BackendKey (Compatible b s)] Source #
Read (BackendKey SqlReadBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods readsPrec :: Int -> ReadS (BackendKey SqlReadBackend) Source # readList :: ReadS [BackendKey SqlReadBackend] Source # readPrec :: ReadPrec (BackendKey SqlReadBackend) Source # readListPrec :: ReadPrec [BackendKey SqlReadBackend] Source #
Read (BackendKey SqlWriteBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods readsPrec :: Int -> ReadS (BackendKey SqlWriteBackend) Source # readList :: ReadS [BackendKey SqlWriteBackend] Source # readPrec :: ReadPrec (BackendKey SqlWriteBackend) Source # readListPrec :: ReadPrec [BackendKey SqlWriteBackend] Source #
Read (BackendKey SqlBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods readsPrec :: Int -> ReadS (BackendKey SqlBackend) Source # readList :: ReadS [BackendKey SqlBackend] Source # readPrec :: ReadPrec (BackendKey SqlBackend) Source # readListPrec :: ReadPrec [BackendKey SqlBackend] Source #
(BackendCompatible b s, Integral (BackendKey b)) => Integral (BackendKey (Compatible b s)) Source # |

Instance details

Defined in Database.Persist.Compatible.Types

Methods

quot :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> BackendKey (Compatible b s) Source #

rem :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> BackendKey (Compatible b s) Source #

div :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> BackendKey (Compatible b s) Source #

mod :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> BackendKey (Compatible b s) Source #

quotRem :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> (BackendKey (Compatible b s), BackendKey (Compatible b s)) Source #

divMod :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> (BackendKey (Compatible b s), BackendKey (Compatible b s)) Source #

toInteger :: BackendKey (Compatible b s) -> Integer Source #

Integral (BackendKey SqlReadBackend) Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

Methods

quot :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> BackendKey SqlReadBackend Source #

rem :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> BackendKey SqlReadBackend Source #

div :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> BackendKey SqlReadBackend Source #

mod :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> BackendKey SqlReadBackend Source #

quotRem :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> (BackendKey SqlReadBackend, BackendKey SqlReadBackend) Source #

divMod :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> (BackendKey SqlReadBackend, BackendKey SqlReadBackend) Source #

toInteger :: BackendKey SqlReadBackend -> Integer Source #

Integral (BackendKey SqlWriteBackend) Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

Methods

quot :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend Source #

rem :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend Source #

div :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend Source #

mod :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend Source #

quotRem :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> (BackendKey SqlWriteBackend, BackendKey SqlWriteBackend) Source #

divMod :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> (BackendKey SqlWriteBackend, BackendKey SqlWriteBackend) Source #

toInteger :: BackendKey SqlWriteBackend -> Integer Source #

Integral (BackendKey SqlBackend) Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

Methods

quot :: BackendKey SqlBackend -> BackendKey SqlBackend -> BackendKey SqlBackend Source #

rem :: BackendKey SqlBackend -> BackendKey SqlBackend -> BackendKey SqlBackend Source #

div :: BackendKey SqlBackend -> BackendKey SqlBackend -> BackendKey SqlBackend Source #

mod :: BackendKey SqlBackend -> BackendKey SqlBackend -> BackendKey SqlBackend Source #

quotRem :: BackendKey SqlBackend -> BackendKey SqlBackend -> (BackendKey SqlBackend, BackendKey SqlBackend) Source #

divMod :: BackendKey SqlBackend -> BackendKey SqlBackend -> (BackendKey SqlBackend, BackendKey SqlBackend) Source #

toInteger :: BackendKey SqlBackend -> Integer Source #

(BackendCompatible b s, Real (BackendKey b)) => Real (BackendKey (Compatible b s)) Source # |
Instance details Defined in Database.Persist.Compatible.Types Methods toRational :: BackendKey (Compatible b s) -> Rational Source #
Real (BackendKey SqlReadBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods toRational :: BackendKey SqlReadBackend -> Rational Source #
Real (BackendKey SqlWriteBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods toRational :: BackendKey SqlWriteBackend -> Rational Source #
Real (BackendKey SqlBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods toRational :: BackendKey SqlBackend -> Rational Source #
(BackendCompatible b s, Show (BackendKey b)) => Show (BackendKey (Compatible b s)) Source # |
Instance details Defined in Database.Persist.Compatible.Types Methods showsPrec :: Int -> BackendKey (Compatible b s) -> ShowS Source # show :: BackendKey (Compatible b s) -> String Source # showList :: [BackendKey (Compatible b s)] -> ShowS Source #
Show (BackendKey SqlReadBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods showsPrec :: Int -> BackendKey SqlReadBackend -> ShowS Source # show :: BackendKey SqlReadBackend -> String Source # showList :: [BackendKey SqlReadBackend] -> ShowS Source #
Show (BackendKey SqlWriteBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods showsPrec :: Int -> BackendKey SqlWriteBackend -> ShowS Source # show :: BackendKey SqlWriteBackend -> String Source # showList :: [BackendKey SqlWriteBackend] -> ShowS Source #
Show (BackendKey SqlBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods showsPrec :: Int -> BackendKey SqlBackend -> ShowS Source # show :: BackendKey SqlBackend -> String Source # showList :: [BackendKey SqlBackend] -> ShowS Source #
(BackendCompatible b s, Eq (BackendKey b)) => Eq (BackendKey (Compatible b s)) Source # |
Instance details Defined in Database.Persist.Compatible.Types Methods (==) :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> Bool Source # (/=) :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> Bool Source #
Eq (BackendKey SqlReadBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods (==) :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> Bool Source # (/=) :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> Bool Source #
Eq (BackendKey SqlWriteBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods (==) :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> Bool Source # (/=) :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> Bool Source #
Eq (BackendKey SqlBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods (==) :: BackendKey SqlBackend -> BackendKey SqlBackend -> Bool Source # (/=) :: BackendKey SqlBackend -> BackendKey SqlBackend -> Bool Source #
(BackendCompatible b s, Ord (BackendKey b)) => Ord (BackendKey (Compatible b s)) Source # |

Instance details

Defined in Database.Persist.Compatible.Types

Methods

compare :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> Ordering Source #

(<) :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> Bool Source #

(<=) :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> Bool Source #

(>) :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> Bool Source #

(>=) :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> Bool Source #

max :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> BackendKey (Compatible b s) Source #

min :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> BackendKey (Compatible b s) Source #

Ord (BackendKey SqlReadBackend) Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

Methods

compare :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> Ordering Source #

(<) :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> Bool Source #

(<=) :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> Bool Source #

(>) :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> Bool Source #

(>=) :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> Bool Source #

max :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> BackendKey SqlReadBackend Source #

min :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> BackendKey SqlReadBackend Source #

Ord (BackendKey SqlWriteBackend) Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

Methods

compare :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> Ordering Source #

(<) :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> Bool Source #

(<=) :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> Bool Source #

(>) :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> Bool Source #

(>=) :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> Bool Source #

max :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend Source #

min :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend Source #

Ord (BackendKey SqlBackend) Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

Methods

compare :: BackendKey SqlBackend -> BackendKey SqlBackend -> Ordering Source #

(<) :: BackendKey SqlBackend -> BackendKey SqlBackend -> Bool Source #

(<=) :: BackendKey SqlBackend -> BackendKey SqlBackend -> Bool Source #

(>) :: BackendKey SqlBackend -> BackendKey SqlBackend -> Bool Source #

(>=) :: BackendKey SqlBackend -> BackendKey SqlBackend -> Bool Source #

max :: BackendKey SqlBackend -> BackendKey SqlBackend -> BackendKey SqlBackend Source #

min :: BackendKey SqlBackend -> BackendKey SqlBackend -> BackendKey SqlBackend Source #

FromHttpApiData (BackendKey SqlReadBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods parseUrlPiece :: Text -> Either Text (BackendKey SqlReadBackend) Source # parseHeader :: ByteString -> Either Text (BackendKey SqlReadBackend) Source # parseQueryParam :: Text -> Either Text (BackendKey SqlReadBackend) Source #
FromHttpApiData (BackendKey SqlWriteBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods parseUrlPiece :: Text -> Either Text (BackendKey SqlWriteBackend) Source # parseHeader :: ByteString -> Either Text (BackendKey SqlWriteBackend) Source # parseQueryParam :: Text -> Either Text (BackendKey SqlWriteBackend) Source #
FromHttpApiData (BackendKey SqlBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods parseUrlPiece :: Text -> Either Text (BackendKey SqlBackend) Source # parseHeader :: ByteString -> Either Text (BackendKey SqlBackend) Source # parseQueryParam :: Text -> Either Text (BackendKey SqlBackend) Source #
ToHttpApiData (BackendKey SqlReadBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods toUrlPiece :: BackendKey SqlReadBackend -> Text Source # toEncodedUrlPiece :: BackendKey SqlReadBackend -> Builder Source # toHeader :: BackendKey SqlReadBackend -> ByteString Source # toQueryParam :: BackendKey SqlReadBackend -> Text Source # toEncodedQueryParam :: BackendKey SqlReadBackend -> Builder Source #
ToHttpApiData (BackendKey SqlWriteBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods toUrlPiece :: BackendKey SqlWriteBackend -> Text Source # toEncodedUrlPiece :: BackendKey SqlWriteBackend -> Builder Source # toHeader :: BackendKey SqlWriteBackend -> ByteString Source # toQueryParam :: BackendKey SqlWriteBackend -> Text Source # toEncodedQueryParam :: BackendKey SqlWriteBackend -> Builder Source #
ToHttpApiData (BackendKey SqlBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods toUrlPiece :: BackendKey SqlBackend -> Text Source # toEncodedUrlPiece :: BackendKey SqlBackend -> Builder Source # toHeader :: BackendKey SqlBackend -> ByteString Source # toQueryParam :: BackendKey SqlBackend -> Text Source # toEncodedQueryParam :: BackendKey SqlBackend -> Builder Source #
PathPiece (BackendKey SqlReadBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods fromPathPiece :: Text -> Maybe (BackendKey SqlReadBackend) Source # toPathPiece :: BackendKey SqlReadBackend -> Text Source #
PathPiece (BackendKey SqlWriteBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods fromPathPiece :: Text -> Maybe (BackendKey SqlWriteBackend) Source # toPathPiece :: BackendKey SqlWriteBackend -> Text Source #
PathPiece (BackendKey SqlBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods fromPathPiece :: Text -> Maybe (BackendKey SqlBackend) Source # toPathPiece :: BackendKey SqlBackend -> Text Source #
(BackendCompatible b s, PersistField (BackendKey b)) => PersistField (BackendKey (Compatible b s)) Source # |
Instance details Defined in Database.Persist.Compatible.Types Methods toPersistValue :: BackendKey (Compatible b s) -> PersistValue Source # fromPersistValue :: PersistValue -> Either Text (BackendKey (Compatible b s)) Source #
PersistField (BackendKey SqlReadBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods toPersistValue :: BackendKey SqlReadBackend -> PersistValue Source # fromPersistValue :: PersistValue -> Either Text (BackendKey SqlReadBackend) Source #
PersistField (BackendKey SqlWriteBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods toPersistValue :: BackendKey SqlWriteBackend -> PersistValue Source # fromPersistValue :: PersistValue -> Either Text (BackendKey SqlWriteBackend) Source #
PersistField (BackendKey SqlBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods toPersistValue :: BackendKey SqlBackend -> PersistValue Source # fromPersistValue :: PersistValue -> Either Text (BackendKey SqlBackend) Source #
(BackendCompatible b s, PersistFieldSql (BackendKey b)) => PersistFieldSql (BackendKey (Compatible b s)) Source # |
Instance details Defined in Database.Persist.Compatible.Types Methods sqlType :: Proxy (BackendKey (Compatible b s)) -> SqlType Source #
PersistFieldSql (BackendKey SqlReadBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods sqlType :: Proxy (BackendKey SqlReadBackend) -> SqlType Source #
PersistFieldSql (BackendKey SqlWriteBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods sqlType :: Proxy (BackendKey SqlWriteBackend) -> SqlType Source #
PersistFieldSql (BackendKey SqlBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods sqlType :: Proxy (BackendKey SqlBackend) -> SqlType Source #
newtype BackendKey SqlReadBackend Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

newtype BackendKey SqlReadBackend = SqlReadBackendKey {

- unSqlReadBackendKey :: Int64

}

newtype BackendKey SqlWriteBackend Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

newtype BackendKey SqlWriteBackend = SqlWriteBackendKey {

- unSqlWriteBackendKey :: Int64

}

newtype BackendKey SqlBackend Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

newtype BackendKey SqlBackend = SqlBackendKey {

- unSqlBackendKey :: Int64

}

type Rep (BackendKey SqlReadBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore type Rep (BackendKey SqlReadBackend) = D1 ('MetaData "BackendKey" "Database.Persist.Sql.Orphan.PersistStore" "persistent-2.17.1.0-EQFFjlejpWP10lX0h8hkWO" 'True) (C1 ('MetaCons "SqlReadBackendKey" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSqlReadBackendKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int64)))
type Rep (BackendKey SqlWriteBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore type Rep (BackendKey SqlWriteBackend) = D1 ('MetaData "BackendKey" "Database.Persist.Sql.Orphan.PersistStore" "persistent-2.17.1.0-EQFFjlejpWP10lX0h8hkWO" 'True) (C1 ('MetaCons "SqlWriteBackendKey" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSqlWriteBackendKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int64)))
type Rep (BackendKey SqlBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore type Rep (BackendKey SqlBackend) = D1 ('MetaData "BackendKey" "Database.Persist.Sql.Orphan.PersistStore" "persistent-2.17.1.0-EQFFjlejpWP10lX0h8hkWO" 'True) (C1 ('MetaCons "SqlBackendKey" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSqlBackendKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int64)))
newtype BackendKey (Compatible b s) Source # |

Instance details

Defined in Database.Persist.Compatible.Types

newtype BackendKey (Compatible b s) = CompatibleKey {

- unCompatibleKey :: BackendKey b

}

withRawQuery :: forall (m :: Type -> Type) a. MonadIO m => Text -> [PersistValue] -> ConduitM [PersistValue] Void IO a -> ReaderT SqlBackend m a Source #

toSqlKey :: ToBackendKey SqlBackend record => Int64 -> Key record Source #

fromSqlKey :: ToBackendKey SqlBackend record => Key record -> Int64 Source #

getFieldName :: forall record typ (m :: Type -> Type) backend. (PersistEntity record, PersistEntityBackend record ~ SqlBackend, BackendCompatible SqlBackend backend, Monad m) => EntityField record typ -> ReaderT backend m Text Source #

get the SQL string for the field that an EntityField represents Useful for raw SQL queries

Your backend may provide a more convenient fieldName function which does not operate in a Monad

getTableName :: forall record (m :: Type -> Type) backend. (PersistEntity record, BackendCompatible SqlBackend backend, Monad m) => record -> ReaderT backend m Text Source #

get the SQL string for the table that a PersistEntity represents Useful for raw SQL queries

Your backend may provide a more convenient tableName function which does not operate in a Monad

tableDBName :: PersistEntity record => record -> EntityNameDB Source #

useful for a backend to implement tableName by adding escaping

fieldDBName :: PersistEntity record => EntityField record typ -> FieldNameDB Source #

useful for a backend to implement fieldName by adding escaping

# The Escape Hatch

`persistent` offers a set of functions that are useful for operating directly on the underlying SQL database. This can allow you to use whatever SQL features you want.

Consider going to <https://hackage.haskell.org/package/esqueleto esqueleto> for a more powerful SQL query library built on `persistent`.

rawQuery :: forall (m :: Type -> Type) env. (MonadResource m, MonadReader env m, BackendCompatible SqlBackend env) => Text -> [PersistValue] -> ConduitM () [PersistValue] m () Source #

rawQueryRes :: forall (m1 :: Type -> Type) (m2 :: Type -> Type) env. (MonadIO m1, MonadIO m2, BackendCompatible SqlBackend env) => Text -> [PersistValue] -> ReaderT env m1 (Acquire (ConduitM () [PersistValue] m2 ())) Source #

rawExecute Source #

Arguments

:: forall (m :: Type -> Type) backend. (MonadIO m, BackendCompatible SqlBackend backend) |
=> Text | SQL statement, possibly with placeholders.
-> [PersistValue] | Values to fill the placeholders.
-> ReaderT backend m () |

Execute a raw SQL statement

rawExecuteCount Source #

Arguments

:: forall (m :: Type -> Type) backend. (MonadIO m, BackendCompatible SqlBackend backend) |
=> Text | SQL statement, possibly with placeholders.
-> [PersistValue] | Values to fill the placeholders.
-> ReaderT backend m Int64 |

Execute a raw SQL statement and return the number of rows it has modified.

rawSql Source #

Arguments

:: forall a (m :: Type -> Type) backend. (RawSql a, MonadIO m, BackendCompatible SqlBackend backend) |
=> Text | SQL statement, possibly with placeholders.
-> [PersistValue] | Values to fill the placeholders.
-> ReaderT backend m [a] |

Execute a raw SQL statement and return its results as a list. If you do not expect a return value, use of `rawExecute` is recommended.

If you're using `Entity` `s` (which is quite likely), then you must use entity selection placeholders (double question mark, `??`). These `??` placeholders are then replaced for the names of the columns that we need for your entities. You'll receive an error if you don't use the placeholders. Please see the `Entity` `s` documentation for more details.

You may put value placeholders (question marks, `?`) in your SQL query. These placeholders are then replaced by the values you pass on the second parameter, already correctly escaped. You may want to use `toPersistValue` to help you constructing the placeholder values.

Since you're giving a raw SQL statement, you don't get any guarantees regarding safety. If `rawSql` is not able to parse the results of your query back, then an exception is raised. However, most common problems are mitigated by using the entity selection placeholder `??`, and you shouldn't see any error at all if you're not using `Single`.

Some example of `rawSql` based on this schema:

    share [mkPersist sqlSettings, mkMigrate "migrateAll"] [persistLowerCase|
    Person
        name String
        age Int Maybe
        deriving Show
    BlogPost
        title String
        authorId PersonId
        deriving Show
    |]

Examples based on the above schema:

    getPerson :: MonadIO m => ReaderT SqlBackend m [Entity Person]
    getPerson = rawSql "select ?? from person where name=?" [PersistText "john"]

    getAge :: MonadIO m => ReaderT SqlBackend m [Single Int]
    getAge = rawSql "select person.age from person where name=?" [PersistText "john"]

    getAgeName :: MonadIO m => ReaderT SqlBackend m [(Single Int, Single Text)]
    getAgeName = rawSql "select person.age, person.name from person where name=?" [PersistText "john"]

    getPersonBlog :: MonadIO m => ReaderT SqlBackend m [(Entity Person, Entity BlogPost)]
    getPersonBlog = rawSql "select ??,?? from person,blog_post where person.id = blog_post.author_id" []

Minimal working program for PostgreSQL backend based on the above concepts:

    {-# LANGUAGE EmptyDataDecls             #-}
    {-# LANGUAGE FlexibleContexts           #-}
    {-# LANGUAGE GADTs                      #-}
    {-# LANGUAGE GeneralizedNewtypeDeriving #-}
    {-# LANGUAGE MultiParamTypeClasses      #-}
    {-# LANGUAGE OverloadedStrings          #-}
    {-# LANGUAGE QuasiQuotes                #-}
    {-# LANGUAGE TemplateHaskell            #-}
    {-# LANGUAGE TypeFamilies               #-}

    import           Control.Monad.IO.Class  (liftIO)
    import           Control.Monad.Logger    (runStderrLoggingT)
    import           Database.Persist
    import           Control.Monad.Reader
    import           Data.Text
    import           Database.Persist.Sql
    import           Database.Persist.Postgresql
    import           Database.Persist.TH

    share [mkPersist sqlSettings, mkMigrate "migrateAll"] [persistLowerCase|
    Person
        name String
        age Int Maybe
        deriving Show
    |]

    conn = "host=localhost dbname=new_db user=postgres password=postgres port=5432"

    getPerson :: MonadIO m => ReaderT SqlBackend m [Entity Person]
    getPerson = rawSql "select ?? from person where name=?" [PersistText "sibi"]

    liftSqlPersistMPool y x = liftIO (runSqlPersistMPool y x)

    main :: IO ()
    main = runStderrLoggingT $ withPostgresqlPool conn 10 $ liftSqlPersistMPool $ do
             runMigration migrateAll
             xs <- getPerson
             liftIO (print xs)

# SQL helpers

deleteWhereCount :: forall val (m :: Type -> Type) backend. (PersistEntity val, MonadIO m, PersistEntityBackend val ~ SqlBackend, BackendCompatible SqlBackend backend) => [Filter val] -> ReaderT backend m Int64 Source #

Same as `deleteWhere`, but returns the number of rows affected.

Since: 1.1.5

updateWhereCount :: forall val (m :: Type -> Type) backend. (PersistEntity val, MonadIO m, SqlBackend ~ PersistEntityBackend val, BackendCompatible SqlBackend backend) => [Filter val] -> [Update val] -> ReaderT backend m Int64 Source #

Same as `updateWhere`, but returns the number of rows affected.

Since: 1.1.5

filterClause Source #

Arguments

:: PersistEntity val |
=> Maybe FilterTablePrefix | include table name or EXCLUDED
-> SqlBackend |
-> [Filter val] |
-> Text |

Render a `[`Filter` record]` into a `Text` value suitable for inclusion into a SQL query.

Since: 2.12.1.0

filterClauseWithVals Source #

Arguments

:: PersistEntity val |
=> Maybe FilterTablePrefix | include table name or EXCLUDED
-> SqlBackend |
-> [Filter val] |
-> (Text, [PersistValue]) |

Render a `[`Filter` record]` into a `Text` value suitable for inclusion into a SQL query, as well as the `[`PersistValue`]` to properly fill in the `?` place holders.

Since: 2.12.1.0

orderClause Source #

Arguments

:: PersistEntity val |
=> Maybe FilterTablePrefix | include table name or EXCLUDED
-> SqlBackend |
-> [SelectOpt val] |
-> Text |

Render a `[`SelectOpt` record]` made up *only* of `Asc` and `Desc` constructors into a `Text` value suitable for inclusion into a SQL query.

Since: 2.13.2.0

data FilterTablePrefix Source #

Used when determining how to prefix a column name in a `WHERE` clause.

Since: 2.12.1.0

Constructors

PrefixTableName | Prefix the column with the table name. This is useful if the column name might be ambiguous. Since: 2.12.1.0
PrefixExcluded | Prefix the column name with the `EXCLUDED` keyword. This is used with the Postgresql backend when doing `ON CONFLICT DO UPDATE` clauses - see the documentation on `upsertWhere` and `upsertManyWhere`. Since: 2.12.1.0

# Transactions

transactionSave :: forall (m :: Type -> Type). MonadIO m => ReaderT SqlBackend m () Source #

Commit the current transaction and begin a new one. This is used when a transaction commit is required within the context of `runSqlConn` (which brackets its provided action with a transaction begin/commit pair).

Since: 1.2.0

transactionSaveWithIsolation :: forall (m :: Type -> Type). MonadIO m => IsolationLevel -> ReaderT SqlBackend m () Source #

Commit the current transaction and begin a new one with the specified isolation level.

Since: 2.9.0

transactionUndo :: forall (m :: Type -> Type). MonadIO m => ReaderT SqlBackend m () Source #

Roll back the current transaction and begin a new one. This rolls back to the state of the last call to `transactionSave` or the enclosing `runSqlConn` call.

Since: 1.2.0

transactionUndoWithIsolation :: forall (m :: Type -> Type). MonadIO m => IsolationLevel -> ReaderT SqlBackend m () Source #

Roll back the current transaction and begin a new one with the specified isolation level.

Since: 2.9.0

# Other utilities

getStmtConn :: SqlBackend -> Text -> IO Statement Source #

mkColumns :: [EntityDef] -> EntityDef -> BackendSpecificOverrides -> ([Column], [UniqueDef], [ForeignDef]) Source #

Create the list of columns for the given entity.

data BackendSpecificOverrides Source #

Record of functions to override the default behavior in `mkColumns`. It is recommended you initialize this with `emptyBackendSpecificOverrides` and override the default values, so that as new fields are added, your code still compiles.

For added safety, use the `getBackendSpecific*` and `setBackendSpecific*` functions, as a breaking change to the record field labels won't be reflected in a major version bump of the library.

Since: 2.11

emptyBackendSpecificOverrides :: BackendSpecificOverrides Source #

Creates an empty `BackendSpecificOverrides` (i.e. use the default behavior; no overrides)

Since: 2.11

getBackendSpecificForeignKeyName :: BackendSpecificOverrides -> Maybe (EntityNameDB -> FieldNameDB -> ConstraintNameDB) Source #

If the override is defined, then this returns a function that accepts an entity name and field name and provides the `ConstraintNameDB` for the foreign key constraint.

An abstract accessor for the `BackendSpecificOverrides`

Since: 2.13.0.0

setBackendSpecificForeignKeyName :: (EntityNameDB -> FieldNameDB -> ConstraintNameDB) -> BackendSpecificOverrides -> BackendSpecificOverrides Source #

Set the backend's foreign key generation function to this value.

Since: 2.13.0.0

defaultAttribute :: [FieldAttr] -> Maybe Text Source #

# Internal

data IsolationLevel Source #

Please refer to the documentation for the database in question for a full overview of the semantics of the varying isolation levels

Constructors

ReadUncommitted |
ReadCommitted |
RepeatableRead |
Serializable |

#### Instances

Instances details

Bounded IsolationLevel Source # |
Instance details Defined in Database.Persist.SqlBackend.Internal.IsolationLevel Methods minBound :: IsolationLevel Source # maxBound :: IsolationLevel Source #
Enum IsolationLevel Source # |

Instance details

Defined in Database.Persist.SqlBackend.Internal.IsolationLevel

Methods

succ :: IsolationLevel -> IsolationLevel Source #

pred :: IsolationLevel -> IsolationLevel Source #

toEnum :: Int -> IsolationLevel Source #

fromEnum :: IsolationLevel -> Int Source #

enumFrom :: IsolationLevel -> [IsolationLevel] Source #

enumFromThen :: IsolationLevel -> IsolationLevel -> [IsolationLevel] Source #

enumFromTo :: IsolationLevel -> IsolationLevel -> [IsolationLevel] Source #

enumFromThenTo :: IsolationLevel -> IsolationLevel -> IsolationLevel -> [IsolationLevel] Source #

Show IsolationLevel Source # |
Instance details Defined in Database.Persist.SqlBackend.Internal.IsolationLevel Methods showsPrec :: Int -> IsolationLevel -> ShowS Source # show :: IsolationLevel -> String Source # showList :: [IsolationLevel] -> ShowS Source #
Eq IsolationLevel Source # |
Instance details Defined in Database.Persist.SqlBackend.Internal.IsolationLevel Methods (==) :: IsolationLevel -> IsolationLevel -> Bool Source # (/=) :: IsolationLevel -> IsolationLevel -> Bool Source #
Ord IsolationLevel Source # |

Instance details

Defined in Database.Persist.SqlBackend.Internal.IsolationLevel

Methods

compare :: IsolationLevel -> IsolationLevel -> Ordering Source #

(<) :: IsolationLevel -> IsolationLevel -> Bool Source #

(<=) :: IsolationLevel -> IsolationLevel -> Bool Source #

(>) :: IsolationLevel -> IsolationLevel -> Bool Source #

(>=) :: IsolationLevel -> IsolationLevel -> Bool Source #

max :: IsolationLevel -> IsolationLevel -> IsolationLevel Source #

min :: IsolationLevel -> IsolationLevel -> IsolationLevel Source #

decorateSQLWithLimitOffset :: Text -> (Int, Int) -> Text -> Text Source #

Generates sql for limit and offset for postgres, sqlite and mysql.

newtype Single a Source #

A single column (see `rawSql`). Any `PersistField` may be used here, including `PersistValue` (which does not do any processing).

Constructors

Single |

Fields

- unSingle :: a

#### Instances

Instances details

Read a => Read (Single a) Source # |
Instance details Defined in Database.Persist.Sql.Types Methods readsPrec :: Int -> ReadS (Single a) Source # readList :: ReadS [Single a] Source # readPrec :: ReadPrec (Single a) Source # readListPrec :: ReadPrec [Single a] Source #
Show a => Show (Single a) Source # |
Instance details Defined in Database.Persist.Sql.Types Methods showsPrec :: Int -> Single a -> ShowS Source # show :: Single a -> String Source # showList :: [Single a] -> ShowS Source #
Eq a => Eq (Single a) Source # |
Instance details Defined in Database.Persist.Sql.Types Methods (==) :: Single a -> Single a -> Bool Source # (/=) :: Single a -> Single a -> Bool Source #
Ord a => Ord (Single a) Source # |
Instance details Defined in Database.Persist.Sql.Types Methods compare :: Single a -> Single a -> Ordering Source # (<) :: Single a -> Single a -> Bool Source # (<=) :: Single a -> Single a -> Bool Source # (>) :: Single a -> Single a -> Bool Source # (>=) :: Single a -> Single a -> Bool Source # max :: Single a -> Single a -> Single a Source # min :: Single a -> Single a -> Single a Source #
PersistField a => RawSql (Single a) Source # |
Instance details Defined in Database.Persist.Sql.Class Methods rawSqlCols :: (Text -> Text) -> Single a -> (Int, [Text]) Source # rawSqlColCountReason :: Single a -> String Source # rawSqlProcessRow :: [PersistValue] -> Either Text (Single a) Source #

data Column Source #

Constructors

Column |

Fields

- cName :: !FieldNameDB
- cNull :: !Bool
- cSqlType :: !SqlType
- cDefault :: !(Maybe Text)
- cGenerated :: !(Maybe Text)
- cDefaultConstraintName :: !(Maybe ConstraintNameDB)
- cMaxLen :: !(Maybe Integer)
- cReference :: !(Maybe ColumnReference)

#### Instances

Instances details

Show Column Source # |
Instance details Defined in Database.Persist.Sql.Types Methods showsPrec :: Int -> Column -> ShowS Source # show :: Column -> String Source # showList :: [Column] -> ShowS Source #
Eq Column Source # |
Instance details Defined in Database.Persist.Sql.Types Methods (==) :: Column -> Column -> Bool Source # (/=) :: Column -> Column -> Bool Source #
Ord Column Source # |
Instance details Defined in Database.Persist.Sql.Types Methods compare :: Column -> Column -> Ordering Source # (<) :: Column -> Column -> Bool Source # (<=) :: Column -> Column -> Bool Source # (>) :: Column -> Column -> Bool Source # (>=) :: Column -> Column -> Bool Source # max :: Column -> Column -> Column Source # min :: Column -> Column -> Column Source #

newtype OverflowNatural Source #

Prior to `persistent-2.11.0`, we provided an instance of `PersistField` for the `Natural` type. This was in error, because `Natural` represents an infinite value, and databases don't have reasonable types for this.

The instance for `Natural` used the `Int64` underlying type, which will cause underflow and overflow errors. This type has the exact same code in the instances, and will work seamlessly.

A more appropriate type for this is the `Word` series of types from Data.Word. These have a bounded size, are guaranteed to be non-negative, and are quite efficient for the database to store.

Since: 2.11.0

Constructors

OverflowNatural |

Fields

- unOverflowNatural :: Natural

#### Instances

Instances details

Num OverflowNatural Source # |

Instance details

Defined in Database.Persist.Class.PersistField

Methods

(+) :: OverflowNatural -> OverflowNatural -> OverflowNatural Source #

(-) :: OverflowNatural -> OverflowNatural -> OverflowNatural Source #

(*) :: OverflowNatural -> OverflowNatural -> OverflowNatural Source #

negate :: OverflowNatural -> OverflowNatural Source #

abs :: OverflowNatural -> OverflowNatural Source #

signum :: OverflowNatural -> OverflowNatural Source #

fromInteger :: Integer -> OverflowNatural Source #

Show OverflowNatural Source # |
Instance details Defined in Database.Persist.Class.PersistField Methods showsPrec :: Int -> OverflowNatural -> ShowS Source # show :: OverflowNatural -> String Source # showList :: [OverflowNatural] -> ShowS Source #
Eq OverflowNatural Source # |
Instance details Defined in Database.Persist.Class.PersistField Methods (==) :: OverflowNatural -> OverflowNatural -> Bool Source # (/=) :: OverflowNatural -> OverflowNatural -> Bool Source #
Ord OverflowNatural Source # |

Instance details

Defined in Database.Persist.Class.PersistField

Methods

compare :: OverflowNatural -> OverflowNatural -> Ordering Source #

(<) :: OverflowNatural -> OverflowNatural -> Bool Source #

(<=) :: OverflowNatural -> OverflowNatural -> Bool Source #

(>) :: OverflowNatural -> OverflowNatural -> Bool Source #

(>=) :: OverflowNatural -> OverflowNatural -> Bool Source #

max :: OverflowNatural -> OverflowNatural -> OverflowNatural Source #

min :: OverflowNatural -> OverflowNatural -> OverflowNatural Source #

PersistField OverflowNatural Source # |
Instance details Defined in Database.Persist.Class.PersistField Methods toPersistValue :: OverflowNatural -> PersistValue Source # fromPersistValue :: PersistValue -> Either Text OverflowNatural Source #
PersistFieldSql OverflowNatural Source # | This type uses the `SqlInt64` version, which will exhibit overflow and underflow behavior. Additionally, it permits negative values in the database, which isn't ideal. Since: 2.11.0
Instance details Defined in Database.Persist.Sql.Class Methods sqlType :: Proxy OverflowNatural -> SqlType Source #

data SqlBackend Source #

A `SqlBackend` represents a handle or connection to a database. It contains functions and values that allow databases to have more optimized implementations, as well as references that benefit performance and sharing.

Instead of using the `SqlBackend` constructor directly, use the `mkSqlBackend` function.

A `SqlBackend` is *not* thread-safe. You should not assume that a `SqlBackend` can be shared among threads and run concurrent queries. This *will* result in problems. Instead, you should create a ``Pool` `SqlBackend``, known as a `ConnectionPool`, and pass that around in multi-threaded applications.

To run actions in the `persistent` library, you should use the `runSqlConn` function. If you're using a multithreaded application, use the `runSqlPool` function.

#### Instances

Instances details

PersistQueryRead SqlBackend Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistQuery

Methods

selectSourceRes :: forall record (m1 :: Type -> Type) (m2 :: Type -> Type). (PersistRecordBackend record SqlBackend, MonadIO m1, MonadIO m2) => [Filter record] -> [SelectOpt record] -> ReaderT SqlBackend m1 (Acquire (ConduitM () (Entity record) m2 ())) Source #

selectFirst :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record SqlBackend) => [Filter record] -> [SelectOpt record] -> ReaderT SqlBackend m (Maybe (Entity record)) Source #

selectKeysRes :: forall (m1 :: Type -> Type) (m2 :: Type -> Type) record. (MonadIO m1, MonadIO m2, PersistRecordBackend record SqlBackend) => [Filter record] -> [SelectOpt record] -> ReaderT SqlBackend m1 (Acquire (ConduitM () (Key record) m2 ())) Source #

count :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record SqlBackend) => [Filter record] -> ReaderT SqlBackend m Int Source #

exists :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record SqlBackend) => [Filter record] -> ReaderT SqlBackend m Bool Source #

PersistQueryWrite SqlBackend Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistQuery

Methods

updateWhere :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record SqlBackend) => [Filter record] -> [Update record] -> ReaderT SqlBackend m () Source #

deleteWhere :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record SqlBackend) => [Filter record] -> ReaderT SqlBackend m () Source #

HasPersistBackend SqlBackend Source # |

Instance details

Defined in Database.Persist.SqlBackend.Internal

Associated Types

type BaseBackend SqlBackend |
Instance details Defined in Database.Persist.SqlBackend.Internal type BaseBackend SqlBackend = SqlBackend

Methods

persistBackend :: SqlBackend -> BaseBackend SqlBackend Source #

IsPersistBackend SqlBackend Source # |
Instance details Defined in Database.Persist.SqlBackend.Internal Methods mkPersistBackend :: BaseBackend SqlBackend -> SqlBackend Source #
PersistCore SqlBackend Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

Associated Types

newtype BackendKey SqlBackend |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

newtype BackendKey SqlBackend = SqlBackendKey {

- unSqlBackendKey :: Int64

}

PersistStoreRead SqlBackend Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

Methods

get :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record SqlBackend) => Key record -> ReaderT SqlBackend m (Maybe record) Source #

getMany :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record SqlBackend) => [Key record] -> ReaderT SqlBackend m (Map (Key record) record) Source #

PersistStoreWrite SqlBackend Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

Methods

insert :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record SqlBackend, SafeToInsert record) => record -> ReaderT SqlBackend m (Key record) Source #

insert_ :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record SqlBackend, SafeToInsert record) => record -> ReaderT SqlBackend m () Source #

insertMany :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record SqlBackend, SafeToInsert record) => [record] -> ReaderT SqlBackend m [Key record] Source #

insertMany_ :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record SqlBackend, SafeToInsert record) => [record] -> ReaderT SqlBackend m () Source #

insertEntityMany :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record SqlBackend) => [Entity record] -> ReaderT SqlBackend m () Source #

insertKey :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record SqlBackend) => Key record -> record -> ReaderT SqlBackend m () Source #

repsert :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record SqlBackend) => Key record -> record -> ReaderT SqlBackend m () Source #

repsertMany :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record SqlBackend) => [(Key record, record)] -> ReaderT SqlBackend m () Source #

replace :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record SqlBackend) => Key record -> record -> ReaderT SqlBackend m () Source #

delete :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record SqlBackend) => Key record -> ReaderT SqlBackend m () Source #

update :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record SqlBackend) => Key record -> [Update record] -> ReaderT SqlBackend m () Source #

updateGet :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record SqlBackend) => Key record -> [Update record] -> ReaderT SqlBackend m record Source #

PersistUniqueRead SqlBackend Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistUnique

Methods

getBy :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record SqlBackend) => Unique record -> ReaderT SqlBackend m (Maybe (Entity record)) Source #

existsBy :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record SqlBackend) => Unique record -> ReaderT SqlBackend m Bool Source #

PersistUniqueWrite SqlBackend Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistUnique

Methods

deleteBy :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record SqlBackend) => Unique record -> ReaderT SqlBackend m () Source #

insertUnique :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record SqlBackend, SafeToInsert record) => record -> ReaderT SqlBackend m (Maybe (Key record)) Source #

insertUnique_ :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record SqlBackend, SafeToInsert record) => record -> ReaderT SqlBackend m (Maybe ()) Source #

upsert :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record SqlBackend, OnlyOneUniqueKey record, SafeToInsert record) => record -> [Update record] -> ReaderT SqlBackend m (Entity record) Source #

upsertBy :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record SqlBackend, SafeToInsert record) => Unique record -> record -> [Update record] -> ReaderT SqlBackend m (Entity record) Source #

putMany :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record SqlBackend, SafeToInsert record) => [record] -> ReaderT SqlBackend m () Source #

BackendCompatible SqlBackend SqlReadBackend Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods projectBackend :: SqlReadBackend -> SqlBackend Source #
BackendCompatible SqlBackend SqlWriteBackend Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods projectBackend :: SqlWriteBackend -> SqlBackend Source #
BackendCompatible SqlBackend SqlBackend Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods projectBackend :: SqlBackend -> SqlBackend Source #
FromJSON (BackendKey SqlBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods parseJSON :: Value -> Parser (BackendKey SqlBackend) Source # parseJSONList :: Value -> Parser [BackendKey SqlBackend] Source # omittedField :: Maybe (BackendKey SqlBackend) Source #
ToJSON (BackendKey SqlBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods toJSON :: BackendKey SqlBackend -> Value Source # toEncoding :: BackendKey SqlBackend -> Encoding Source # toJSONList :: [BackendKey SqlBackend] -> Value Source # toEncodingList :: [BackendKey SqlBackend] -> Encoding Source # omitField :: BackendKey SqlBackend -> Bool Source #
Bounded (BackendKey SqlBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods minBound :: BackendKey SqlBackend Source # maxBound :: BackendKey SqlBackend Source #
Enum (BackendKey SqlBackend) Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

Methods

succ :: BackendKey SqlBackend -> BackendKey SqlBackend Source #

pred :: BackendKey SqlBackend -> BackendKey SqlBackend Source #

toEnum :: Int -> BackendKey SqlBackend Source #

fromEnum :: BackendKey SqlBackend -> Int Source #

enumFrom :: BackendKey SqlBackend -> [BackendKey SqlBackend] Source #

enumFromThen :: BackendKey SqlBackend -> BackendKey SqlBackend -> [BackendKey SqlBackend] Source #

enumFromTo :: BackendKey SqlBackend -> BackendKey SqlBackend -> [BackendKey SqlBackend] Source #

enumFromThenTo :: BackendKey SqlBackend -> BackendKey SqlBackend -> BackendKey SqlBackend -> [BackendKey SqlBackend] Source #

Generic (BackendKey SqlBackend) Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

Associated Types

type Rep (BackendKey SqlBackend) |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore type Rep (BackendKey SqlBackend) = D1 ('MetaData "BackendKey" "Database.Persist.Sql.Orphan.PersistStore" "persistent-2.17.1.0-EQFFjlejpWP10lX0h8hkWO" 'True) (C1 ('MetaCons "SqlBackendKey" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSqlBackendKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int64)))

Methods

from :: BackendKey SqlBackend -> Rep (BackendKey SqlBackend) x Source #

to :: Rep (BackendKey SqlBackend) x -> BackendKey SqlBackend Source #

Num (BackendKey SqlBackend) Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

Methods

(+) :: BackendKey SqlBackend -> BackendKey SqlBackend -> BackendKey SqlBackend Source #

(-) :: BackendKey SqlBackend -> BackendKey SqlBackend -> BackendKey SqlBackend Source #

(*) :: BackendKey SqlBackend -> BackendKey SqlBackend -> BackendKey SqlBackend Source #

negate :: BackendKey SqlBackend -> BackendKey SqlBackend Source #

abs :: BackendKey SqlBackend -> BackendKey SqlBackend Source #

signum :: BackendKey SqlBackend -> BackendKey SqlBackend Source #

fromInteger :: Integer -> BackendKey SqlBackend Source #

Read (BackendKey SqlBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods readsPrec :: Int -> ReadS (BackendKey SqlBackend) Source # readList :: ReadS [BackendKey SqlBackend] Source # readPrec :: ReadPrec (BackendKey SqlBackend) Source # readListPrec :: ReadPrec [BackendKey SqlBackend] Source #
Integral (BackendKey SqlBackend) Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

Methods

quot :: BackendKey SqlBackend -> BackendKey SqlBackend -> BackendKey SqlBackend Source #

rem :: BackendKey SqlBackend -> BackendKey SqlBackend -> BackendKey SqlBackend Source #

div :: BackendKey SqlBackend -> BackendKey SqlBackend -> BackendKey SqlBackend Source #

mod :: BackendKey SqlBackend -> BackendKey SqlBackend -> BackendKey SqlBackend Source #

quotRem :: BackendKey SqlBackend -> BackendKey SqlBackend -> (BackendKey SqlBackend, BackendKey SqlBackend) Source #

divMod :: BackendKey SqlBackend -> BackendKey SqlBackend -> (BackendKey SqlBackend, BackendKey SqlBackend) Source #

toInteger :: BackendKey SqlBackend -> Integer Source #

Real (BackendKey SqlBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods toRational :: BackendKey SqlBackend -> Rational Source #
Show (BackendKey SqlBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods showsPrec :: Int -> BackendKey SqlBackend -> ShowS Source # show :: BackendKey SqlBackend -> String Source # showList :: [BackendKey SqlBackend] -> ShowS Source #
Eq (BackendKey SqlBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods (==) :: BackendKey SqlBackend -> BackendKey SqlBackend -> Bool Source # (/=) :: BackendKey SqlBackend -> BackendKey SqlBackend -> Bool Source #
Ord (BackendKey SqlBackend) Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

Methods

compare :: BackendKey SqlBackend -> BackendKey SqlBackend -> Ordering Source #

(<) :: BackendKey SqlBackend -> BackendKey SqlBackend -> Bool Source #

(<=) :: BackendKey SqlBackend -> BackendKey SqlBackend -> Bool Source #

(>) :: BackendKey SqlBackend -> BackendKey SqlBackend -> Bool Source #

(>=) :: BackendKey SqlBackend -> BackendKey SqlBackend -> Bool Source #

max :: BackendKey SqlBackend -> BackendKey SqlBackend -> BackendKey SqlBackend Source #

min :: BackendKey SqlBackend -> BackendKey SqlBackend -> BackendKey SqlBackend Source #

FromHttpApiData (BackendKey SqlBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods parseUrlPiece :: Text -> Either Text (BackendKey SqlBackend) Source # parseHeader :: ByteString -> Either Text (BackendKey SqlBackend) Source # parseQueryParam :: Text -> Either Text (BackendKey SqlBackend) Source #
ToHttpApiData (BackendKey SqlBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods toUrlPiece :: BackendKey SqlBackend -> Text Source # toEncodedUrlPiece :: BackendKey SqlBackend -> Builder Source # toHeader :: BackendKey SqlBackend -> ByteString Source # toQueryParam :: BackendKey SqlBackend -> Text Source # toEncodedQueryParam :: BackendKey SqlBackend -> Builder Source #
PathPiece (BackendKey SqlBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods fromPathPiece :: Text -> Maybe (BackendKey SqlBackend) Source # toPathPiece :: BackendKey SqlBackend -> Text Source #
PersistField (BackendKey SqlBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods toPersistValue :: BackendKey SqlBackend -> PersistValue Source # fromPersistValue :: PersistValue -> Either Text (BackendKey SqlBackend) Source #
PersistFieldSql (BackendKey SqlBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods sqlType :: Proxy (BackendKey SqlBackend) -> SqlType Source #
newtype BackendKey SqlBackend Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

newtype BackendKey SqlBackend = SqlBackendKey {

- unSqlBackendKey :: Int64

}

type BaseBackend SqlBackend Source # |
Instance details Defined in Database.Persist.SqlBackend.Internal type BaseBackend SqlBackend = SqlBackend
type Rep (BackendKey SqlBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore type Rep (BackendKey SqlBackend) = D1 ('MetaData "BackendKey" "Database.Persist.Sql.Orphan.PersistStore" "persistent-2.17.1.0-EQFFjlejpWP10lX0h8hkWO" 'True) (C1 ('MetaCons "SqlBackendKey" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSqlBackendKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int64)))

newtype SqlReadBackend Source #

An SQL backend which can only handle read queries

The constructor was exposed in 2.10.0.

Constructors

SqlReadBackend |

Fields

- unSqlReadBackend :: SqlBackend

#### Instances

Instances details

PersistQueryRead SqlReadBackend Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistQuery

Methods

selectSourceRes :: forall record (m1 :: Type -> Type) (m2 :: Type -> Type). (PersistRecordBackend record SqlReadBackend, MonadIO m1, MonadIO m2) => [Filter record] -> [SelectOpt record] -> ReaderT SqlReadBackend m1 (Acquire (ConduitM () (Entity record) m2 ())) Source #

selectFirst :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record SqlReadBackend) => [Filter record] -> [SelectOpt record] -> ReaderT SqlReadBackend m (Maybe (Entity record)) Source #

selectKeysRes :: forall (m1 :: Type -> Type) (m2 :: Type -> Type) record. (MonadIO m1, MonadIO m2, PersistRecordBackend record SqlReadBackend) => [Filter record] -> [SelectOpt record] -> ReaderT SqlReadBackend m1 (Acquire (ConduitM () (Key record) m2 ())) Source #

count :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record SqlReadBackend) => [Filter record] -> ReaderT SqlReadBackend m Int Source #

exists :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record SqlReadBackend) => [Filter record] -> ReaderT SqlReadBackend m Bool Source #

HasPersistBackend SqlReadBackend Source # |

Instance details

Defined in Database.Persist.Sql.Types.Internal

Associated Types

type BaseBackend SqlReadBackend |
Instance details Defined in Database.Persist.Sql.Types.Internal type BaseBackend SqlReadBackend = SqlBackend

Methods

persistBackend :: SqlReadBackend -> BaseBackend SqlReadBackend Source #

IsPersistBackend SqlReadBackend Source # |
Instance details Defined in Database.Persist.Sql.Types.Internal Methods mkPersistBackend :: BaseBackend SqlReadBackend -> SqlReadBackend Source #
PersistCore SqlReadBackend Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

Associated Types

newtype BackendKey SqlReadBackend |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

newtype BackendKey SqlReadBackend = SqlReadBackendKey {

- unSqlReadBackendKey :: Int64

}

PersistStoreRead SqlReadBackend Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

Methods

get :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record SqlReadBackend) => Key record -> ReaderT SqlReadBackend m (Maybe record) Source #

getMany :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record SqlReadBackend) => [Key record] -> ReaderT SqlReadBackend m (Map (Key record) record) Source #

PersistUniqueRead SqlReadBackend Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistUnique

Methods

getBy :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record SqlReadBackend) => Unique record -> ReaderT SqlReadBackend m (Maybe (Entity record)) Source #

existsBy :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record SqlReadBackend) => Unique record -> ReaderT SqlReadBackend m Bool Source #

BackendCompatible SqlBackend SqlReadBackend Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods projectBackend :: SqlReadBackend -> SqlBackend Source #
FromJSON (BackendKey SqlReadBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods parseJSON :: Value -> Parser (BackendKey SqlReadBackend) Source # parseJSONList :: Value -> Parser [BackendKey SqlReadBackend] Source # omittedField :: Maybe (BackendKey SqlReadBackend) Source #
ToJSON (BackendKey SqlReadBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods toJSON :: BackendKey SqlReadBackend -> Value Source # toEncoding :: BackendKey SqlReadBackend -> Encoding Source # toJSONList :: [BackendKey SqlReadBackend] -> Value Source # toEncodingList :: [BackendKey SqlReadBackend] -> Encoding Source # omitField :: BackendKey SqlReadBackend -> Bool Source #
Bounded (BackendKey SqlReadBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods minBound :: BackendKey SqlReadBackend Source # maxBound :: BackendKey SqlReadBackend Source #
Enum (BackendKey SqlReadBackend) Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

Methods

succ :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend Source #

pred :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend Source #

toEnum :: Int -> BackendKey SqlReadBackend Source #

fromEnum :: BackendKey SqlReadBackend -> Int Source #

enumFrom :: BackendKey SqlReadBackend -> [BackendKey SqlReadBackend] Source #

enumFromThen :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> [BackendKey SqlReadBackend] Source #

enumFromTo :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> [BackendKey SqlReadBackend] Source #

enumFromThenTo :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> [BackendKey SqlReadBackend] Source #

Generic (BackendKey SqlReadBackend) Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

Associated Types

type Rep (BackendKey SqlReadBackend) |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore type Rep (BackendKey SqlReadBackend) = D1 ('MetaData "BackendKey" "Database.Persist.Sql.Orphan.PersistStore" "persistent-2.17.1.0-EQFFjlejpWP10lX0h8hkWO" 'True) (C1 ('MetaCons "SqlReadBackendKey" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSqlReadBackendKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int64)))

Methods

from :: BackendKey SqlReadBackend -> Rep (BackendKey SqlReadBackend) x Source #

to :: Rep (BackendKey SqlReadBackend) x -> BackendKey SqlReadBackend Source #

Num (BackendKey SqlReadBackend) Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

Methods

(+) :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> BackendKey SqlReadBackend Source #

(-) :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> BackendKey SqlReadBackend Source #

(*) :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> BackendKey SqlReadBackend Source #

negate :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend Source #

abs :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend Source #

signum :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend Source #

fromInteger :: Integer -> BackendKey SqlReadBackend Source #

Read (BackendKey SqlReadBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods readsPrec :: Int -> ReadS (BackendKey SqlReadBackend) Source # readList :: ReadS [BackendKey SqlReadBackend] Source # readPrec :: ReadPrec (BackendKey SqlReadBackend) Source # readListPrec :: ReadPrec [BackendKey SqlReadBackend] Source #
Integral (BackendKey SqlReadBackend) Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

Methods

quot :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> BackendKey SqlReadBackend Source #

rem :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> BackendKey SqlReadBackend Source #

div :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> BackendKey SqlReadBackend Source #

mod :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> BackendKey SqlReadBackend Source #

quotRem :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> (BackendKey SqlReadBackend, BackendKey SqlReadBackend) Source #

divMod :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> (BackendKey SqlReadBackend, BackendKey SqlReadBackend) Source #

toInteger :: BackendKey SqlReadBackend -> Integer Source #

Real (BackendKey SqlReadBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods toRational :: BackendKey SqlReadBackend -> Rational Source #
Show (BackendKey SqlReadBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods showsPrec :: Int -> BackendKey SqlReadBackend -> ShowS Source # show :: BackendKey SqlReadBackend -> String Source # showList :: [BackendKey SqlReadBackend] -> ShowS Source #
Eq (BackendKey SqlReadBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods (==) :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> Bool Source # (/=) :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> Bool Source #
Ord (BackendKey SqlReadBackend) Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

Methods

compare :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> Ordering Source #

(<) :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> Bool Source #

(<=) :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> Bool Source #

(>) :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> Bool Source #

(>=) :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> Bool Source #

max :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> BackendKey SqlReadBackend Source #

min :: BackendKey SqlReadBackend -> BackendKey SqlReadBackend -> BackendKey SqlReadBackend Source #

FromHttpApiData (BackendKey SqlReadBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods parseUrlPiece :: Text -> Either Text (BackendKey SqlReadBackend) Source # parseHeader :: ByteString -> Either Text (BackendKey SqlReadBackend) Source # parseQueryParam :: Text -> Either Text (BackendKey SqlReadBackend) Source #
ToHttpApiData (BackendKey SqlReadBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods toUrlPiece :: BackendKey SqlReadBackend -> Text Source # toEncodedUrlPiece :: BackendKey SqlReadBackend -> Builder Source # toHeader :: BackendKey SqlReadBackend -> ByteString Source # toQueryParam :: BackendKey SqlReadBackend -> Text Source # toEncodedQueryParam :: BackendKey SqlReadBackend -> Builder Source #
PathPiece (BackendKey SqlReadBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods fromPathPiece :: Text -> Maybe (BackendKey SqlReadBackend) Source # toPathPiece :: BackendKey SqlReadBackend -> Text Source #
PersistField (BackendKey SqlReadBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods toPersistValue :: BackendKey SqlReadBackend -> PersistValue Source # fromPersistValue :: PersistValue -> Either Text (BackendKey SqlReadBackend) Source #
PersistFieldSql (BackendKey SqlReadBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods sqlType :: Proxy (BackendKey SqlReadBackend) -> SqlType Source #
newtype BackendKey SqlReadBackend Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

newtype BackendKey SqlReadBackend = SqlReadBackendKey {

- unSqlReadBackendKey :: Int64

}

type BaseBackend SqlReadBackend Source # |
Instance details Defined in Database.Persist.Sql.Types.Internal type BaseBackend SqlReadBackend = SqlBackend
type Rep (BackendKey SqlReadBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore type Rep (BackendKey SqlReadBackend) = D1 ('MetaData "BackendKey" "Database.Persist.Sql.Orphan.PersistStore" "persistent-2.17.1.0-EQFFjlejpWP10lX0h8hkWO" 'True) (C1 ('MetaCons "SqlReadBackendKey" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSqlReadBackendKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int64)))

newtype SqlWriteBackend Source #

An SQL backend which can handle read or write queries

The constructor was exposed in 2.10.0

Constructors

SqlWriteBackend |

Fields

- unSqlWriteBackend :: SqlBackend

#### Instances

Instances details

PersistQueryRead SqlWriteBackend Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistQuery

Methods

selectSourceRes :: forall record (m1 :: Type -> Type) (m2 :: Type -> Type). (PersistRecordBackend record SqlWriteBackend, MonadIO m1, MonadIO m2) => [Filter record] -> [SelectOpt record] -> ReaderT SqlWriteBackend m1 (Acquire (ConduitM () (Entity record) m2 ())) Source #

selectFirst :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record SqlWriteBackend) => [Filter record] -> [SelectOpt record] -> ReaderT SqlWriteBackend m (Maybe (Entity record)) Source #

selectKeysRes :: forall (m1 :: Type -> Type) (m2 :: Type -> Type) record. (MonadIO m1, MonadIO m2, PersistRecordBackend record SqlWriteBackend) => [Filter record] -> [SelectOpt record] -> ReaderT SqlWriteBackend m1 (Acquire (ConduitM () (Key record) m2 ())) Source #

count :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record SqlWriteBackend) => [Filter record] -> ReaderT SqlWriteBackend m Int Source #

exists :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record SqlWriteBackend) => [Filter record] -> ReaderT SqlWriteBackend m Bool Source #

PersistQueryWrite SqlWriteBackend Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistQuery

Methods

updateWhere :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record SqlWriteBackend) => [Filter record] -> [Update record] -> ReaderT SqlWriteBackend m () Source #

deleteWhere :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record SqlWriteBackend) => [Filter record] -> ReaderT SqlWriteBackend m () Source #

HasPersistBackend SqlWriteBackend Source # |

Instance details

Defined in Database.Persist.Sql.Types.Internal

Associated Types

type BaseBackend SqlWriteBackend |
Instance details Defined in Database.Persist.Sql.Types.Internal type BaseBackend SqlWriteBackend = SqlBackend

Methods

persistBackend :: SqlWriteBackend -> BaseBackend SqlWriteBackend Source #

IsPersistBackend SqlWriteBackend Source # |
Instance details Defined in Database.Persist.Sql.Types.Internal Methods mkPersistBackend :: BaseBackend SqlWriteBackend -> SqlWriteBackend Source #
PersistCore SqlWriteBackend Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

Associated Types

newtype BackendKey SqlWriteBackend |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

newtype BackendKey SqlWriteBackend = SqlWriteBackendKey {

- unSqlWriteBackendKey :: Int64

}

PersistStoreRead SqlWriteBackend Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

Methods

get :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record SqlWriteBackend) => Key record -> ReaderT SqlWriteBackend m (Maybe record) Source #

getMany :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record SqlWriteBackend) => [Key record] -> ReaderT SqlWriteBackend m (Map (Key record) record) Source #

PersistStoreWrite SqlWriteBackend Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

Methods

insert :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record SqlWriteBackend, SafeToInsert record) => record -> ReaderT SqlWriteBackend m (Key record) Source #

insert_ :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record SqlWriteBackend, SafeToInsert record) => record -> ReaderT SqlWriteBackend m () Source #

insertMany :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record SqlWriteBackend, SafeToInsert record) => [record] -> ReaderT SqlWriteBackend m [Key record] Source #

insertMany_ :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record SqlWriteBackend, SafeToInsert record) => [record] -> ReaderT SqlWriteBackend m () Source #

insertEntityMany :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record SqlWriteBackend) => [Entity record] -> ReaderT SqlWriteBackend m () Source #

insertKey :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record SqlWriteBackend) => Key record -> record -> ReaderT SqlWriteBackend m () Source #

repsert :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record SqlWriteBackend) => Key record -> record -> ReaderT SqlWriteBackend m () Source #

repsertMany :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record SqlWriteBackend) => [(Key record, record)] -> ReaderT SqlWriteBackend m () Source #

replace :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record SqlWriteBackend) => Key record -> record -> ReaderT SqlWriteBackend m () Source #

delete :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record SqlWriteBackend) => Key record -> ReaderT SqlWriteBackend m () Source #

update :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record SqlWriteBackend) => Key record -> [Update record] -> ReaderT SqlWriteBackend m () Source #

updateGet :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record SqlWriteBackend) => Key record -> [Update record] -> ReaderT SqlWriteBackend m record Source #

PersistUniqueRead SqlWriteBackend Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistUnique

Methods

getBy :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record SqlWriteBackend) => Unique record -> ReaderT SqlWriteBackend m (Maybe (Entity record)) Source #

existsBy :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record SqlWriteBackend) => Unique record -> ReaderT SqlWriteBackend m Bool Source #

PersistUniqueWrite SqlWriteBackend Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistUnique

Methods

deleteBy :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record SqlWriteBackend) => Unique record -> ReaderT SqlWriteBackend m () Source #

insertUnique :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record SqlWriteBackend, SafeToInsert record) => record -> ReaderT SqlWriteBackend m (Maybe (Key record)) Source #

insertUnique_ :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record SqlWriteBackend, SafeToInsert record) => record -> ReaderT SqlWriteBackend m (Maybe ()) Source #

upsert :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record SqlWriteBackend, OnlyOneUniqueKey record, SafeToInsert record) => record -> [Update record] -> ReaderT SqlWriteBackend m (Entity record) Source #

upsertBy :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record SqlWriteBackend, SafeToInsert record) => Unique record -> record -> [Update record] -> ReaderT SqlWriteBackend m (Entity record) Source #

putMany :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record SqlWriteBackend, SafeToInsert record) => [record] -> ReaderT SqlWriteBackend m () Source #

BackendCompatible SqlBackend SqlWriteBackend Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods projectBackend :: SqlWriteBackend -> SqlBackend Source #
FromJSON (BackendKey SqlWriteBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods parseJSON :: Value -> Parser (BackendKey SqlWriteBackend) Source # parseJSONList :: Value -> Parser [BackendKey SqlWriteBackend] Source # omittedField :: Maybe (BackendKey SqlWriteBackend) Source #
ToJSON (BackendKey SqlWriteBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods toJSON :: BackendKey SqlWriteBackend -> Value Source # toEncoding :: BackendKey SqlWriteBackend -> Encoding Source # toJSONList :: [BackendKey SqlWriteBackend] -> Value Source # toEncodingList :: [BackendKey SqlWriteBackend] -> Encoding Source # omitField :: BackendKey SqlWriteBackend -> Bool Source #
Bounded (BackendKey SqlWriteBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods minBound :: BackendKey SqlWriteBackend Source # maxBound :: BackendKey SqlWriteBackend Source #
Enum (BackendKey SqlWriteBackend) Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

Methods

succ :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend Source #

pred :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend Source #

toEnum :: Int -> BackendKey SqlWriteBackend Source #

fromEnum :: BackendKey SqlWriteBackend -> Int Source #

enumFrom :: BackendKey SqlWriteBackend -> [BackendKey SqlWriteBackend] Source #

enumFromThen :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> [BackendKey SqlWriteBackend] Source #

enumFromTo :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> [BackendKey SqlWriteBackend] Source #

enumFromThenTo :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> [BackendKey SqlWriteBackend] Source #

Generic (BackendKey SqlWriteBackend) Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

Associated Types

type Rep (BackendKey SqlWriteBackend) |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore type Rep (BackendKey SqlWriteBackend) = D1 ('MetaData "BackendKey" "Database.Persist.Sql.Orphan.PersistStore" "persistent-2.17.1.0-EQFFjlejpWP10lX0h8hkWO" 'True) (C1 ('MetaCons "SqlWriteBackendKey" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSqlWriteBackendKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int64)))

Methods

from :: BackendKey SqlWriteBackend -> Rep (BackendKey SqlWriteBackend) x Source #

to :: Rep (BackendKey SqlWriteBackend) x -> BackendKey SqlWriteBackend Source #

Num (BackendKey SqlWriteBackend) Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

Methods

(+) :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend Source #

(-) :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend Source #

(*) :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend Source #

negate :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend Source #

abs :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend Source #

signum :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend Source #

fromInteger :: Integer -> BackendKey SqlWriteBackend Source #

Read (BackendKey SqlWriteBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods readsPrec :: Int -> ReadS (BackendKey SqlWriteBackend) Source # readList :: ReadS [BackendKey SqlWriteBackend] Source # readPrec :: ReadPrec (BackendKey SqlWriteBackend) Source # readListPrec :: ReadPrec [BackendKey SqlWriteBackend] Source #
Integral (BackendKey SqlWriteBackend) Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

Methods

quot :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend Source #

rem :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend Source #

div :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend Source #

mod :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend Source #

quotRem :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> (BackendKey SqlWriteBackend, BackendKey SqlWriteBackend) Source #

divMod :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> (BackendKey SqlWriteBackend, BackendKey SqlWriteBackend) Source #

toInteger :: BackendKey SqlWriteBackend -> Integer Source #

Real (BackendKey SqlWriteBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods toRational :: BackendKey SqlWriteBackend -> Rational Source #
Show (BackendKey SqlWriteBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods showsPrec :: Int -> BackendKey SqlWriteBackend -> ShowS Source # show :: BackendKey SqlWriteBackend -> String Source # showList :: [BackendKey SqlWriteBackend] -> ShowS Source #
Eq (BackendKey SqlWriteBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods (==) :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> Bool Source # (/=) :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> Bool Source #
Ord (BackendKey SqlWriteBackend) Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

Methods

compare :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> Ordering Source #

(<) :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> Bool Source #

(<=) :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> Bool Source #

(>) :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> Bool Source #

(>=) :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> Bool Source #

max :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend Source #

min :: BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend -> BackendKey SqlWriteBackend Source #

FromHttpApiData (BackendKey SqlWriteBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods parseUrlPiece :: Text -> Either Text (BackendKey SqlWriteBackend) Source # parseHeader :: ByteString -> Either Text (BackendKey SqlWriteBackend) Source # parseQueryParam :: Text -> Either Text (BackendKey SqlWriteBackend) Source #
ToHttpApiData (BackendKey SqlWriteBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods toUrlPiece :: BackendKey SqlWriteBackend -> Text Source # toEncodedUrlPiece :: BackendKey SqlWriteBackend -> Builder Source # toHeader :: BackendKey SqlWriteBackend -> ByteString Source # toQueryParam :: BackendKey SqlWriteBackend -> Text Source # toEncodedQueryParam :: BackendKey SqlWriteBackend -> Builder Source #
PathPiece (BackendKey SqlWriteBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods fromPathPiece :: Text -> Maybe (BackendKey SqlWriteBackend) Source # toPathPiece :: BackendKey SqlWriteBackend -> Text Source #
PersistField (BackendKey SqlWriteBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods toPersistValue :: BackendKey SqlWriteBackend -> PersistValue Source # fromPersistValue :: PersistValue -> Either Text (BackendKey SqlWriteBackend) Source #
PersistFieldSql (BackendKey SqlWriteBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore Methods sqlType :: Proxy (BackendKey SqlWriteBackend) -> SqlType Source #
newtype BackendKey SqlWriteBackend Source # |

Instance details

Defined in Database.Persist.Sql.Orphan.PersistStore

newtype BackendKey SqlWriteBackend = SqlWriteBackendKey {

- unSqlWriteBackendKey :: Int64

}

type BaseBackend SqlWriteBackend Source # |
Instance details Defined in Database.Persist.Sql.Types.Internal type BaseBackend SqlWriteBackend = SqlBackend
type Rep (BackendKey SqlWriteBackend) Source # |
Instance details Defined in Database.Persist.Sql.Orphan.PersistStore type Rep (BackendKey SqlWriteBackend) = D1 ('MetaData "BackendKey" "Database.Persist.Sql.Orphan.PersistStore" "persistent-2.17.1.0-EQFFjlejpWP10lX0h8hkWO" 'True) (C1 ('MetaCons "SqlWriteBackendKey" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSqlWriteBackendKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int64)))

readToUnknown :: forall (m :: Type -> Type) a. Monad m => ReaderT SqlReadBackend m a -> ReaderT SqlBackend m a Source #

Useful for running a read query against a backend with unknown capabilities.

readToWrite :: forall (m :: Type -> Type) a. Monad m => ReaderT SqlReadBackend m a -> ReaderT SqlWriteBackend m a Source #

Useful for running a read query against a backend with read and write capabilities.

writeToUnknown :: forall (m :: Type -> Type) a. Monad m => ReaderT SqlWriteBackend m a -> ReaderT SqlBackend m a Source #

Useful for running a write query against an untagged backend with unknown capabilities.

type LogFunc = Loc -> LogSource -> LogLevel -> LogStr -> IO () Source #

data InsertSqlResult Source #

Constructors

ISRSingle Text |
ISRInsertGet Text Text |
ISRManyKeys Text [PersistValue] |

data Statement Source #

A `Statement` is a representation of a database query that has been prepared and stored on the server side.

Constructors

Statement |

Fields

- stmtFinalize :: IO ()
- stmtReset :: IO ()
- stmtExecute :: [PersistValue] -> IO Int64
- stmtQuery :: forall (m :: Type -> Type). MonadIO m => [PersistValue] -> Acquire (ConduitM () [PersistValue] m ())

type SqlBackendCanRead backend = (BackendCompatible SqlBackend backend, PersistQueryRead backend, PersistStoreRead backend, PersistUniqueRead backend) Source #

A constraint synonym which witnesses that a backend is SQL and can run read queries.

type SqlBackendCanWrite backend = (SqlBackendCanRead backend, PersistQueryWrite backend, PersistStoreWrite backend, PersistUniqueWrite backend) Source #

A constraint synonym which witnesses that a backend is SQL and can run read and write queries.

type SqlReadT (m :: Type -> Type) a = forall backend. SqlBackendCanRead backend => ReaderT backend m a Source #

Like `SqlPersistT` but compatible with any SQL backend which can handle read queries.

type SqlWriteT (m :: Type -> Type) a = forall backend. SqlBackendCanWrite backend => ReaderT backend m a Source #

Like `SqlPersistT` but compatible with any SQL backend which can handle read and write queries.

type IsSqlBackend backend = (IsPersistBackend backend, BaseBackend backend ~ SqlBackend) Source #

A backend which is a wrapper around `SqlBackend`.

data ConnectionPoolConfig Source #

Values to configure a pool of database connections. See Data.Pool for details.

Since: 2.11.0.0

Constructors

ConnectionPoolConfig |

Fields

- connectionPoolConfigStripes :: Int

  How many stripes to divide the pool into. See Data.Pool for details. Default: 1.

- connectionPoolConfigIdleTimeout :: NominalDiffTime

  How long connections can remain idle before being disposed of, in seconds. Default: 600

- connectionPoolConfigSize :: Int

  How many connections should be held in the connection pool. Default: 10

#### Instances

Instances details

Show ConnectionPoolConfig Source # |
Instance details Defined in Database.Persist.Sql.Types Methods showsPrec :: Int -> ConnectionPoolConfig -> ShowS Source # show :: ConnectionPoolConfig -> String Source # showList :: [ConnectionPoolConfig] -> ShowS Source #

type ConnectionPool = Pool SqlBackend Source #

type SqlPersistT = ReaderT SqlBackend Source #

data ColumnReference Source #

This value specifies how a field references another table.

Since: 2.11.0.0

Constructors

ColumnReference |

Fields

- crTableName :: !EntityNameDB

  The table name that the

  Since: 2.11.0.0

- crConstraintName :: !ConstraintNameDB

  The name of the foreign key constraint.

  Since: 2.11.0.0

- crFieldCascade :: !FieldCascade

  Whether or not updates/deletions to the referenced table cascade to this table.

  Since: 2.11.0.0

#### Instances

Instances details

Show ColumnReference Source # |
Instance details Defined in Database.Persist.Sql.Types Methods showsPrec :: Int -> ColumnReference -> ShowS Source # show :: ColumnReference -> String Source # showList :: [ColumnReference] -> ShowS Source #
Eq ColumnReference Source # |
Instance details Defined in Database.Persist.Sql.Types Methods (==) :: ColumnReference -> ColumnReference -> Bool Source # (/=) :: ColumnReference -> ColumnReference -> Bool Source #
Ord ColumnReference Source # |

Instance details

Defined in Database.Persist.Sql.Types

Methods

compare :: ColumnReference -> ColumnReference -> Ordering Source #

(<) :: ColumnReference -> ColumnReference -> Bool Source #

(<=) :: ColumnReference -> ColumnReference -> Bool Source #

(>) :: ColumnReference -> ColumnReference -> Bool Source #

(>=) :: ColumnReference -> ColumnReference -> Bool Source #

max :: ColumnReference -> ColumnReference -> ColumnReference Source #

min :: ColumnReference -> ColumnReference -> ColumnReference Source #

data PersistentSqlException Source #

Constructors

StatementAlreadyFinalized Text |
Couldn'tGetSQLConnection |

#### Instances

Instances details

Exception PersistentSqlException Source # |
Instance details Defined in Database.Persist.Sql.Types Methods toException :: PersistentSqlException -> SomeException Source # fromException :: SomeException -> Maybe PersistentSqlException Source # displayException :: PersistentSqlException -> String Source # backtraceDesired :: PersistentSqlException -> Bool Source #
Show PersistentSqlException Source # |
Instance details Defined in Database.Persist.Sql.Types Methods showsPrec :: Int -> PersistentSqlException -> ShowS Source # show :: PersistentSqlException -> String Source # showList :: [PersistentSqlException] -> ShowS Source #

type SqlPersistM = SqlPersistT (NoLoggingT (ResourceT IO)) Source #

defaultConnectionPoolConfig :: ConnectionPoolConfig Source #

Initializes a ConnectionPoolConfig with default values. See the documentation of `ConnectionPoolConfig` for each field's default value.

Since: 2.11.0.0