Safe Haskell | None |
---|---|
Language | Haskell2010 |
Database.Persist.Sqlite
Description
A sqlite backend for persistent.
Note: If you prepend WAL=off
to your connection string, it will disable
the write-ahead log. This functionality is now deprecated in favour of using SqliteConnectionInfo.
Synopsis
- withSqlitePool :: (MonadUnliftIO m, MonadLoggerIO m) => Text -> Int -> (Pool SqlBackend -> m a) -> m a
- withSqlitePoolInfo :: (MonadUnliftIO m, MonadLoggerIO m) => SqliteConnectionInfo -> Int -> (Pool SqlBackend -> m a) -> m a
- withSqliteConn :: (MonadUnliftIO m, MonadLoggerIO m) => Text -> (SqlBackend -> m a) -> m a
- withSqliteConnInfo :: (MonadUnliftIO m, MonadLoggerIO m) => SqliteConnectionInfo -> (SqlBackend -> m a) -> m a
- createSqlitePool :: (MonadLoggerIO m, MonadUnliftIO m) => Text -> Int -> m (Pool SqlBackend)
- createSqlitePoolFromInfo :: (MonadLoggerIO m, MonadUnliftIO m) => SqliteConnectionInfo -> Int -> m (Pool SqlBackend)
- createSqlitePoolWithConfig :: (MonadUnliftIO m, MonadLoggerIO m) => Text -> ConnectionPoolConfig -> m (Pool SqlBackend)
- data Statement = Statement {
- stmtFinalize :: IO ()
- stmtReset :: IO ()
- stmtExecute :: [PersistValue] -> IO Int64
- stmtQuery :: forall (m :: Type -> Type). MonadIO m => [PersistValue] -> Acquire (ConduitM () [PersistValue] m ())
- data PersistValue where
- PersistText Text
- PersistByteString ByteString
- PersistInt64 Int64
- PersistDouble Double
- PersistRational Rational
- PersistBool Bool
- PersistDay Day
- PersistTimeOfDay TimeOfDay
- PersistUTCTime UTCTime
- PersistNull
- PersistList [PersistValue]
- PersistMap [(Text, PersistValue)]
- PersistObjectId ByteString
- PersistArray [PersistValue]
- PersistLiteral_ LiteralType ByteString
- pattern PersistDbSpecific :: ByteString -> PersistValue
- pattern PersistLiteral :: ByteString -> PersistValue
- pattern PersistLiteralEscaped :: ByteString -> PersistValue
- listToJSON :: [PersistValue] -> Text
- mapToJSON :: [(Text, PersistValue)] -> Text
- data LiteralType
- type Sql = Text
- data SqlBackend
- data PersistFilter
- class (PersistCore backend, PersistStoreRead backend) => PersistQueryRead backend where
- selectSourceRes :: forall record (m1 :: Type -> Type) (m2 :: Type -> Type). (PersistRecordBackend record backend, MonadIO m1, MonadIO m2) => [Filter record] -> [SelectOpt record] -> ReaderT backend m1 (Acquire (ConduitM () (Entity record) m2 ()))
- selectFirst :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record backend) => [Filter record] -> [SelectOpt record] -> ReaderT backend m (Maybe (Entity record))
- selectKeysRes :: forall (m1 :: Type -> Type) (m2 :: Type -> Type) record. (MonadIO m1, MonadIO m2, PersistRecordBackend record backend) => [Filter record] -> [SelectOpt record] -> ReaderT backend m1 (Acquire (ConduitM () (Key record) m2 ()))
- count :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record backend) => [Filter record] -> ReaderT backend m Int
- exists :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record backend) => [Filter record] -> ReaderT backend m Bool
- class (Show (BackendKey backend), Read (BackendKey backend), Eq (BackendKey backend), Ord (BackendKey backend), PersistStoreRead backend, PersistField (BackendKey backend), ToJSON (BackendKey backend), FromJSON (BackendKey backend)) => PersistStoreWrite backend where
- insert :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend, SafeToInsert record) => record -> ReaderT backend m (Key record)
- insert_ :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend, SafeToInsert record) => record -> ReaderT backend m ()
- insertMany :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend, SafeToInsert record) => [record] -> ReaderT backend m [Key record]
- insertMany_ :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend, SafeToInsert record) => [record] -> ReaderT backend m ()
- insertEntityMany :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend) => [Entity record] -> ReaderT backend m ()
- insertKey :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend) => Key record -> record -> ReaderT backend m ()
- repsert :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend) => Key record -> record -> ReaderT backend m ()
- repsertMany :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend) => [(Key record, record)] -> ReaderT backend m ()
- replace :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend) => Key record -> record -> ReaderT backend m ()
- delete :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend) => Key record -> ReaderT backend m ()
- update :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend) => Key record -> [Update record] -> ReaderT backend m ()
- updateGet :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend) => Key record -> [Update record] -> ReaderT backend m record
- type PersistQuery a = PersistQueryWrite a
- type PersistStore a = PersistStoreWrite a
- type PersistUnique a = PersistUniqueWrite a
- class PersistConfig c where
- type PersistConfigBackend c :: (Type -> Type) -> Type -> Type
- type PersistConfigPool c
- loadConfig :: Value -> Parser c
- applyEnv :: c -> IO c
- createPoolConfig :: c -> IO (PersistConfigPool c)
- runPool :: MonadUnliftIO m => c -> PersistConfigBackend c m a -> PersistConfigPool c -> m a
- type family PersistConfigBackend c :: (Type -> Type) -> Type -> Type
- type family PersistConfigPool c
- data SelectOpt record
- = Asc (EntityField record typ)
- | Desc (EntityField record typ)
- | OffsetBy Int
- | LimitTo Int
- data Filter record
- = PersistField typ => Filter {
- filterField :: EntityField record typ
- filterValue :: FilterValue typ
- filterFilter :: PersistFilter
- | FilterAnd [Filter record]
- | FilterOr [Filter record]
- | BackendFilter (BackendSpecificFilter (PersistEntityBackend record) record)
- = PersistField typ => Filter {
- type family BackendSpecificFilter backend record
- type family BackendSpecificUpdate backend record
- data PersistUpdate
- data Update record
- = PersistField typ => Update {
- updateField :: EntityField record typ
- updateValue :: typ
- updateUpdate :: PersistUpdate
- | BackendUpdate (BackendSpecificUpdate (PersistEntityBackend record) record)
- = PersistField typ => Update {
- data Entity record = Entity {}
- class (PersistField (Key record), ToJSON (Key record), FromJSON (Key record), Show (Key record), Read (Key record), Eq (Key record), Ord (Key record)) => PersistEntity record where
- type PersistEntityBackend record
- data Key record
- data EntityField record :: Type -> Type
- data Unique record
- keyToValues :: Key record -> [PersistValue]
- keyFromValues :: [PersistValue] -> Either Text (Key record)
- persistIdField :: EntityField record (Key record)
- entityDef :: proxy record -> EntityDef
- persistFieldDef :: EntityField record typ -> FieldDef
- toPersistFields :: record -> [PersistValue]
- fromPersistValues :: [PersistValue] -> Either Text record
- tabulateEntityA :: Applicative f => (forall a. EntityField record a -> f a) -> f (Entity record)
- persistUniqueKeys :: record -> [Unique record]
- persistUniqueToFieldNames :: Unique record -> NonEmpty (FieldNameHS, FieldNameDB)
- persistUniqueToValues :: Unique record -> [PersistValue]
- fieldLens :: EntityField record field -> forall (f :: Type -> Type). Functor f => (field -> f field) -> Entity record -> f (Entity record)
- keyFromRecordM :: Maybe (record -> Key record)
- data family EntityField record :: Type -> Type
- data FilterValue typ where
- FilterValue :: forall typ. typ -> FilterValue typ
- FilterValues :: forall typ. [typ] -> FilterValue typ
- UnsafeValue :: forall a typ. PersistField a => a -> FilterValue typ
- data family Key record
- type family PersistEntityBackend record
- class SafeToInsert a
- class SymbolToField (sym :: Symbol) rec typ | sym rec -> typ where
- symbolToField :: EntityField rec typ
- data family Unique record
- entityIdFromJSON :: (PersistEntity record, FromJSON record) => Value -> Parser (Entity record)
- entityIdToJSON :: (PersistEntity record, ToJSON record) => Entity record -> Value
- entityValues :: PersistEntity record => Entity record -> [PersistValue]
- fromPersistValueJSON :: FromJSON a => PersistValue -> Either Text a
- keyValueEntityFromJSON :: (PersistEntity record, FromJSON record) => Value -> Parser (Entity record)
- keyValueEntityToJSON :: (PersistEntity record, ToJSON record) => Entity record -> Value
- tabulateEntity :: PersistEntity record => (forall a. EntityField record a -> a) -> Entity record
- toPersistValueJSON :: ToJSON a => a -> PersistValue
- newtype OverflowNatural = OverflowNatural {
- unOverflowNatural :: Natural
- class PersistField a where
- toPersistValue :: a -> PersistValue
- fromPersistValue :: PersistValue -> Either Text a
- getPersistMap :: PersistValue -> Either Text [(Text, PersistValue)]
- class (PersistQueryRead backend, PersistStoreWrite backend) => PersistQueryWrite backend where
- updateWhere :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record backend) => [Filter record] -> [Update record] -> ReaderT backend m ()
- deleteWhere :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record backend) => [Filter record] -> ReaderT backend m ()
- selectKeys :: forall record backend (m :: Type -> Type). (PersistQueryRead backend, MonadResource m, PersistRecordBackend record backend, MonadReader backend m) => [Filter record] -> [SelectOpt record] -> ConduitM () (Key record) m ()
- selectKeysList :: forall record backend (m :: Type -> Type). (MonadIO m, PersistQueryRead backend, PersistRecordBackend record backend) => [Filter record] -> [SelectOpt record] -> ReaderT backend m [Key record]
- selectList :: forall record backend (m :: Type -> Type). (MonadIO m, PersistQueryRead backend, PersistRecordBackend record backend) => [Filter record] -> [SelectOpt record] -> ReaderT backend m [Entity record]
- selectSource :: forall record backend (m :: Type -> Type). (PersistQueryRead backend, MonadResource m, PersistRecordBackend record backend, MonadReader backend m) => [Filter record] -> [SelectOpt record] -> ConduitM () (Entity record) m ()
- class BackendCompatible sup sub where
- projectBackend :: sub -> sup
- class PersistCore backend where
- data BackendKey backend
- data family BackendKey backend
- class HasPersistBackend backend where
- type BaseBackend backend
- persistBackend :: backend -> BaseBackend backend
- type family BaseBackend backend
- class HasPersistBackend backend => IsPersistBackend backend
- type PersistRecordBackend record backend = (PersistEntity record, PersistEntityBackend record ~ BaseBackend backend)
- class (Show (BackendKey backend), Read (BackendKey backend), Eq (BackendKey backend), Ord (BackendKey backend), PersistCore backend, PersistField (BackendKey backend), ToJSON (BackendKey backend), FromJSON (BackendKey backend)) => PersistStoreRead backend where
- get :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend) => Key record -> ReaderT backend m (Maybe record)
- getMany :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend) => [Key record] -> ReaderT backend m (Map (Key record) record)
- class (PersistEntity record, PersistEntityBackend record ~ backend, PersistCore backend) => ToBackendKey backend record where
- toBackendKey :: Key record -> BackendKey backend
- fromBackendKey :: BackendKey backend -> Key record
- belongsTo :: forall ent1 ent2 backend (m :: Type -> Type). (PersistStoreRead backend, PersistEntity ent1, PersistRecordBackend ent2 backend, MonadIO m) => (ent1 -> Maybe (Key ent2)) -> ent1 -> ReaderT backend m (Maybe ent2)
- belongsToJust :: forall ent1 ent2 backend (m :: Type -> Type). (PersistStoreRead backend, PersistEntity ent1, PersistRecordBackend ent2 backend, MonadIO m) => (ent1 -> Key ent2) -> ent1 -> ReaderT backend m ent2
- getEntity :: forall e backend (m :: Type -> Type). (PersistStoreRead backend, PersistRecordBackend e backend, MonadIO m) => Key e -> ReaderT backend m (Maybe (Entity e))
- getJust :: forall record backend (m :: Type -> Type). (PersistStoreRead backend, PersistRecordBackend record backend, MonadIO m) => Key record -> ReaderT backend m record
- getJustEntity :: forall record backend (m :: Type -> Type). (PersistEntityBackend record ~ BaseBackend backend, MonadIO m, PersistEntity record, PersistStoreRead backend) => Key record -> ReaderT backend m (Entity record)
- insertEntity :: forall e backend (m :: Type -> Type). (PersistStoreWrite backend, PersistRecordBackend e backend, SafeToInsert e, MonadIO m, HasCallStack) => e -> ReaderT backend m (Entity e)
- insertRecord :: forall record backend (m :: Type -> Type). (PersistEntityBackend record ~ BaseBackend backend, PersistEntity record, MonadIO m, PersistStoreWrite backend, SafeToInsert record, HasCallStack) => record -> ReaderT backend m record
- liftPersist :: (MonadIO m, MonadReader backend m) => ReaderT backend IO b -> m b
- withBaseBackend :: forall backend (m :: Type -> Type) a. HasPersistBackend backend => ReaderT (BaseBackend backend) m a -> ReaderT backend m a
- withCompatibleBackend :: forall sup sub (m :: Type -> Type) a. BackendCompatible sup sub => ReaderT sup m a -> ReaderT sub m a
- class PersistEntity record => AtLeastOneUniqueKey record where
- requireUniquesP :: record -> NonEmpty (Unique record)
- type MultipleUniqueKeysError ty = ((('Text "The entity " ':<>: 'ShowType ty) ':<>: 'Text " has multiple unique keys.") ':$$: ('Text "The function you are trying to call requires only a single " ':<>: 'Text "unique key.")) ':$$: (('Text "There is probably a variant of the function with 'By' " ':<>: 'Text "appended that will allow you to select a unique key ") ':<>: 'Text "for the operation.")
- type NoUniqueKeysError ty = (('Text "The entity " ':<>: 'ShowType ty) ':<>: 'Text " does not have any unique keys.") ':$$: ('Text "The function you are trying to call requires a unique key " ':<>: 'Text "to be defined on the entity.")
- class PersistEntity record => OnlyOneUniqueKey record where
- onlyUniqueP :: record -> Unique record
- class PersistStoreRead backend => PersistUniqueRead backend where
- getBy :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend) => Unique record -> ReaderT backend m (Maybe (Entity record))
- existsBy :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend) => Unique record -> ReaderT backend m Bool
- class (PersistUniqueRead backend, PersistStoreWrite backend) => PersistUniqueWrite backend where
- deleteBy :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend) => Unique record -> ReaderT backend m ()
- insertUnique :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend, SafeToInsert record) => record -> ReaderT backend m (Maybe (Key record))
- insertUnique_ :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend, SafeToInsert record) => record -> ReaderT backend m (Maybe ())
- upsert :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend, OnlyOneUniqueKey record, SafeToInsert record) => record -> [Update record] -> ReaderT backend m (Entity record)
- upsertBy :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend, SafeToInsert record) => Unique record -> record -> [Update record] -> ReaderT backend m (Entity record)
- putMany :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend, SafeToInsert record) => [record] -> ReaderT backend m ()
- checkUnique :: forall record backend (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend, PersistUniqueRead backend) => record -> ReaderT backend m (Maybe (Unique record))
- checkUniqueUpdateable :: forall record backend (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend, PersistUniqueRead backend) => Entity record -> ReaderT backend m (Maybe (Unique record))
- getByValue :: forall record (m :: Type -> Type) backend. (MonadIO m, PersistUniqueRead backend, PersistRecordBackend record backend, AtLeastOneUniqueKey record) => record -> ReaderT backend m (Maybe (Entity record))
- insertBy :: forall record backend (m :: Type -> Type). (MonadIO m, PersistUniqueWrite backend, PersistRecordBackend record backend, AtLeastOneUniqueKey record, SafeToInsert record) => record -> ReaderT backend m (Either (Entity record) (Key record))
- insertUniqueEntity :: forall record backend (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend, PersistUniqueWrite backend, SafeToInsert record) => record -> ReaderT backend m (Maybe (Entity record))
- onlyOneUniqueDef :: (OnlyOneUniqueKey record, Monad proxy) => proxy record -> UniqueDef
- onlyUnique :: forall record backend (m :: Type -> Type). (MonadIO m, PersistUniqueWrite backend, PersistRecordBackend record backend, OnlyOneUniqueKey record) => record -> ReaderT backend m (Unique record)
- replaceUnique :: forall record backend (m :: Type -> Type). (MonadIO m, Eq (Unique record), PersistRecordBackend record backend, PersistUniqueWrite backend) => Key record -> record -> ReaderT backend m (Maybe (Unique record))
- getEntityComments :: EntityDef -> Maybe Text
- getEntityDBName :: EntityDef -> EntityNameDB
- getEntityExtra :: EntityDef -> Map Text [[Text]]
- getEntityFields :: EntityDef -> [FieldDef]
- getEntityFieldsDatabase :: EntityDef -> [FieldDef]
- getEntityForeignDefs :: EntityDef -> [ForeignDef]
- getEntityHaskellName :: EntityDef -> EntityNameHS
- getEntityId :: EntityDef -> EntityIdDef
- getEntityIdField :: EntityDef -> Maybe FieldDef
- getEntityKeyFields :: EntityDef -> NonEmpty FieldDef
- getEntityUniques :: EntityDef -> [UniqueDef]
- getEntityUniquesNoPrimaryKey :: EntityDef -> [UniqueDef]
- isEntitySum :: EntityDef -> Bool
- overEntityFields :: ([FieldDef] -> [FieldDef]) -> EntityDef -> EntityDef
- setEntityDBName :: EntityNameDB -> EntityDef -> EntityDef
- setEntityId :: FieldDef -> EntityDef -> EntityDef
- setEntityIdDef :: EntityIdDef -> EntityDef -> EntityDef
- addFieldAttr :: FieldAttr -> FieldDef -> FieldDef
- isFieldMaybe :: FieldDef -> Bool
- isFieldNullable :: FieldDef -> IsNullable
- overFieldAttrs :: ([FieldAttr] -> [FieldAttr]) -> FieldDef -> FieldDef
- setFieldAttrs :: [FieldAttr] -> FieldDef -> FieldDef
- newtype ConstraintNameDB = ConstraintNameDB {
- unConstraintNameDB :: Text
- newtype ConstraintNameHS = ConstraintNameHS {
- unConstraintNameHS :: Text
- class DatabaseName a where
- escapeWith :: (Text -> str) -> a -> str
- newtype EntityNameDB = EntityNameDB {
- unEntityNameDB :: Text
- newtype EntityNameHS = EntityNameHS {
- unEntityNameHS :: Text
- newtype FieldNameDB = FieldNameDB {
- unFieldNameDB :: Text
- newtype FieldNameHS = FieldNameHS {
- unFieldNameHS :: Text
- fromPersistValueText :: PersistValue -> Either Text Text
- data Checkmark
- type Attr = Text
- data WhyNullable
- data CascadeAction
- = Cascade
- | Restrict
- | SetNull
- | SetDefault
- data CompositeDef = CompositeDef {
- compositeFields :: !(NonEmpty FieldDef)
- compositeAttrs :: ![Attr]
- data EmbedEntityDef = EmbedEntityDef {}
- data EmbedFieldDef = EmbedFieldDef {
- emFieldDB :: FieldNameDB
- emFieldEmbed :: Maybe (Either SelfEmbed EntityNameHS)
- data ReferenceDef
- data EntityDef
- data EntityIdDef
- type ExtraLine = [Text]
- data FieldType
- data FieldAttr
- = FieldAttrMaybe
- | FieldAttrNullable
- | FieldAttrMigrationOnly
- | FieldAttrSafeToRemove
- | FieldAttrNoreference
- | FieldAttrReference Text
- | FieldAttrConstraint Text
- | FieldAttrDefault Text
- | FieldAttrSqltype Text
- | FieldAttrMaxlen Integer
- | FieldAttrSql Text
- | FieldAttrOther Text
- data FieldCascade = FieldCascade {
- fcOnUpdate :: !(Maybe CascadeAction)
- fcOnDelete :: !(Maybe CascadeAction)
- data FieldDef = FieldDef {
- fieldHaskell :: !FieldNameHS
- fieldDB :: !FieldNameDB
- fieldType :: !FieldType
- fieldSqlType :: !SqlType
- fieldAttrs :: ![FieldAttr]
- fieldStrict :: !Bool
- fieldReference :: !ReferenceDef
- fieldCascade :: !FieldCascade
- fieldComments :: !(Maybe Text)
- fieldGenerated :: !(Maybe Text)
- fieldIsImplicitIdColumn :: !Bool
- data ForeignDef = ForeignDef {
- foreignRefTableHaskell :: !EntityNameHS
- foreignRefTableDBName :: !EntityNameDB
- foreignConstraintNameHaskell :: !ConstraintNameHS
- foreignConstraintNameDBName :: !ConstraintNameDB
- foreignFieldCascade :: !FieldCascade
- foreignFields :: ![(ForeignFieldDef, ForeignFieldDef)]
- foreignAttrs :: ![Attr]
- foreignNullable :: Bool
- foreignToPrimary :: Bool
- type ForeignFieldDef = (FieldNameHS, FieldNameDB)
- data IsNullable
- data UpdateException
- = KeyNotFound String
- | UpsertError String
- data PersistException
- = PersistError Text
- | PersistMarshalError Text
- | PersistInvalidField Text
- | PersistForeignConstraintUnmet Text
- | PersistMongoDBError Text
- | PersistMongoDBUnsupported Text
- data SqlType
- data UniqueDef = UniqueDef {
- uniqueHaskell :: !ConstraintNameHS
- uniqueDBName :: !ConstraintNameDB
- uniqueFields :: !(NonEmpty (FieldNameHS, FieldNameDB))
- uniqueAttrs :: ![Attr]
- entitiesPrimary :: EntityDef -> NonEmpty FieldDef
- entityPrimary :: EntityDef -> Maybe CompositeDef
- fieldAttrsContainsNullable :: [FieldAttr] -> IsNullable
- isFieldNotGenerated :: FieldDef -> Bool
- isHaskellField :: FieldDef -> Bool
- keyAndEntityFields :: EntityDef -> NonEmpty FieldDef
- noCascade :: FieldCascade
- parseFieldAttrs :: [Text] -> [FieldAttr]
- renderCascadeAction :: CascadeAction -> Text
- renderFieldCascade :: FieldCascade -> Text
- (!=.) :: forall v typ. PersistField typ => EntityField v typ -> typ -> Filter v
- (*=.) :: forall v typ. PersistField typ => EntityField v typ -> typ -> Update v
- (+=.) :: forall v typ. PersistField typ => EntityField v typ -> typ -> Update v
- (-=.) :: forall v typ. PersistField typ => EntityField v typ -> typ -> Update v
- (/<-.) :: forall v typ. PersistField typ => EntityField v typ -> [typ] -> Filter v
- (/=.) :: forall v typ. PersistField typ => EntityField v typ -> typ -> Update v
- (<-.) :: forall v typ. PersistField typ => EntityField v typ -> [typ] -> Filter v
- (<.) :: forall v typ. PersistField typ => EntityField v typ -> typ -> Filter v
- (<=.) :: forall v typ. PersistField typ => EntityField v typ -> typ -> Filter v
- (=.) :: forall v typ. PersistField typ => EntityField v typ -> typ -> Update v
- (==.) :: forall v typ. PersistField typ => EntityField v typ -> typ -> Filter v
- (>.) :: forall v typ. PersistField typ => EntityField v typ -> typ -> Filter v
- (>=.) :: forall v typ. PersistField typ => EntityField v typ -> typ -> Filter v
- (||.) :: [Filter v] -> [Filter v] -> [Filter v]
- toJsonText :: ToJSON j => j -> Text
- limitOffsetOrder :: PersistEntity val => [SelectOpt val] -> (Int, Int, [SelectOpt val])
- createSqlPool :: forall backend m. (MonadLoggerIO m, MonadUnliftIO m, BackendCompatible SqlBackend backend) => (LogFunc -> IO backend) -> Int -> m (Pool backend)
- data ConnectionPoolConfig = ConnectionPoolConfig {
- connectionPoolConfigStripes :: Int
- connectionPoolConfigIdleTimeout :: NominalDiffTime
- connectionPoolConfigSize :: Int
- createSqlPoolWithConfig :: (MonadLoggerIO m, MonadUnliftIO m, BackendCompatible SqlBackend backend) => (LogFunc -> IO backend) -> ConnectionPoolConfig -> m (Pool backend)
- withSqlPool :: forall backend m a. (MonadLoggerIO m, MonadUnliftIO m, BackendCompatible SqlBackend backend) => (LogFunc -> IO backend) -> Int -> (Pool backend -> m a) -> m a
- withSqlConn :: forall backend m a. (MonadUnliftIO m, MonadLoggerIO m, BackendCompatible SqlBackend backend) => (LogFunc -> IO backend) -> (backend -> m a) -> m a
- type LogFunc = Loc -> LogSource -> LogLevel -> LogStr -> IO ()
- rawExecute :: forall (m :: Type -> Type) backend. (MonadIO m, BackendCompatible SqlBackend backend) => Text -> [PersistValue] -> ReaderT backend m ()
- decorateSQLWithLimitOffset :: Text -> (Int, Int) -> Text -> Text
- runSqlConn :: forall backend m a. (MonadUnliftIO m, BackendCompatible SqlBackend backend) => ReaderT backend m a -> backend -> m a
- data InsertSqlResult
- = ISRSingle Text
- | ISRInsertGet Text Text
- | ISRManyKeys Text [PersistValue]
- data Column = Column {
- cName :: !FieldNameDB
- cNull :: !Bool
- cSqlType :: !SqlType
- cDefault :: !(Maybe Text)
- cGenerated :: !(Maybe Text)
- cDefaultConstraintName :: !(Maybe ConstraintNameDB)
- cMaxLen :: !(Maybe Integer)
- cReference :: !(Maybe ColumnReference)
- mkColumns :: [EntityDef] -> EntityDef -> BackendSpecificOverrides -> ([Column], [UniqueDef], [ForeignDef])
- emptyBackendSpecificOverrides :: BackendSpecificOverrides
- type CautiousMigration = [(Bool, Sql)]
- type Migration = WriterT [Text] (WriterT CautiousMigration (ReaderT SqlBackend IO)) ()
- defaultAttribute :: [FieldAttr] -> Maybe Text
- data ColumnReference = ColumnReference {}
- type SqlPersistT = ReaderT SqlBackend
- type ConnectionPool = Pool SqlBackend
- runSqlPool :: forall backend m a. (MonadUnliftIO m, BackendCompatible SqlBackend backend) => ReaderT backend m a -> Pool backend -> m a
- rawQuery :: forall (m :: Type -> Type) env. (MonadResource m, MonadReader env m, BackendCompatible SqlBackend env) => Text -> [PersistValue] -> ConduitM () [PersistValue] m ()
- close' :: BackendCompatible SqlBackend backend => backend -> IO ()
- reportError :: Text -> Migration
- newtype EntityWithPrefix (prefix :: Symbol) record = EntityWithPrefix {
- unEntityWithPrefix :: Entity record
- class PersistField a => PersistFieldSql a where
- class RawSql a where
- rawSqlCols :: (Text -> Text) -> a -> (Int, [Text])
- rawSqlColCountReason :: a -> String
- rawSqlProcessRow :: [PersistValue] -> Either Text a
- unPrefix :: forall (prefix :: Symbol) record. EntityWithPrefix prefix record -> Entity record
- data BackendSpecificOverrides
- getBackendSpecificForeignKeyName :: BackendSpecificOverrides -> Maybe (EntityNameDB -> FieldNameDB -> ConstraintNameDB)
- setBackendSpecificForeignKeyName :: (EntityNameDB -> FieldNameDB -> ConstraintNameDB) -> BackendSpecificOverrides -> BackendSpecificOverrides
- newtype PersistUnsafeMigrationException = PersistUnsafeMigrationException [(Bool, Sql)]
- addMigration :: Bool -> Sql -> Migration
- addMigrations :: CautiousMigration -> Migration
- getMigration :: forall (m :: Type -> Type). (MonadIO m, HasCallStack) => Migration -> ReaderT SqlBackend m [Sql]
- migrate :: [EntityDef] -> EntityDef -> Migration
- parseMigration :: forall (m :: Type -> Type). (HasCallStack, MonadIO m) => Migration -> ReaderT SqlBackend m (Either [Text] CautiousMigration)
- parseMigration' :: forall (m :: Type -> Type). (HasCallStack, MonadIO m) => Migration -> ReaderT SqlBackend m CautiousMigration
- printMigration :: forall (m :: Type -> Type). (HasCallStack, MonadIO m) => Migration -> ReaderT SqlBackend m ()
- reportErrors :: [Text] -> Migration
- runMigration :: forall (m :: Type -> Type). MonadIO m => Migration -> ReaderT SqlBackend m ()
- runMigrationQuiet :: forall (m :: Type -> Type). MonadIO m => Migration -> ReaderT SqlBackend m [Text]
- runMigrationSilent :: forall (m :: Type -> Type). MonadUnliftIO m => Migration -> ReaderT SqlBackend m [Text]
- runMigrationUnsafe :: forall (m :: Type -> Type). MonadIO m => Migration -> ReaderT SqlBackend m ()
- runMigrationUnsafeQuiet :: forall (m :: Type -> Type). (HasCallStack, MonadIO m) => Migration -> ReaderT SqlBackend m [Text]
- runSqlCommand :: SqlPersistT IO () -> Migration
- showMigration :: forall (m :: Type -> Type). (HasCallStack, MonadIO m) => Migration -> ReaderT SqlBackend m [Text]
- data FilterTablePrefix
- deleteWhereCount :: forall val (m :: Type -> Type) backend. (PersistEntity val, MonadIO m, PersistEntityBackend val ~ SqlBackend, BackendCompatible SqlBackend backend) => [Filter 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
- 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
- fieldDBName :: PersistEntity record => EntityField record typ -> FieldNameDB
- 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
- toSqlKey :: ToBackendKey SqlBackend record => Int64 -> Key record
- withRawQuery :: forall (m :: Type -> Type) a. MonadIO m => Text -> [PersistValue] -> ConduitM [PersistValue] Void IO a -> ReaderT SqlBackend m a
- getStmtConn :: SqlBackend -> Text -> IO Statement
- rawExecuteCount :: forall (m :: Type -> Type) backend. (MonadIO m, BackendCompatible SqlBackend backend) => Text -> [PersistValue] -> ReaderT backend m Int64
- 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 ()))
- rawSql :: forall a (m :: Type -> Type) backend. (RawSql a, MonadIO m, BackendCompatible SqlBackend backend) => Text -> [PersistValue] -> ReaderT backend m [a]
- acquireSqlConn :: (MonadReader backend m, BackendCompatible SqlBackend backend) => m (Acquire backend)
- acquireSqlConnWithIsolation :: (MonadReader backend m, BackendCompatible SqlBackend backend) => IsolationLevel -> m (Acquire backend)
- liftSqlPersistMPool :: forall backend m a. (MonadIO m, BackendCompatible SqlBackend backend) => ReaderT backend (NoLoggingT (ResourceT IO)) a -> Pool backend -> m a
- 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
- runSqlPoolNoTransaction :: forall backend m a. (MonadUnliftIO m, BackendCompatible SqlBackend backend) => ReaderT backend m a -> Pool backend -> Maybe IsolationLevel -> 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
- 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
- runSqlPoolWithIsolation :: forall backend m a. (MonadUnliftIO m, BackendCompatible SqlBackend backend) => ReaderT backend m a -> Pool backend -> IsolationLevel -> m a
- withSqlPoolWithConfig :: forall backend m a. (MonadLoggerIO m, MonadUnliftIO m, BackendCompatible SqlBackend backend) => (LogFunc -> IO backend) -> ConnectionPoolConfig -> (Pool backend -> m a) -> m a
- data PersistentSqlException
- newtype Single a = Single {
- unSingle :: a
- type SqlPersistM = SqlPersistT (NoLoggingT (ResourceT IO))
- defaultConnectionPoolConfig :: ConnectionPoolConfig
- type IsSqlBackend backend = (IsPersistBackend backend, BaseBackend backend ~ SqlBackend)
- type SqlBackendCanRead backend = (BackendCompatible SqlBackend backend, PersistQueryRead backend, PersistStoreRead backend, PersistUniqueRead backend)
- type SqlBackendCanWrite backend = (SqlBackendCanRead backend, PersistQueryWrite backend, PersistStoreWrite backend, PersistUniqueWrite backend)
- newtype SqlReadBackend = SqlReadBackend {}
- type SqlReadT (m :: Type -> Type) a = forall backend. SqlBackendCanRead backend => ReaderT backend m a
- newtype SqlWriteBackend = SqlWriteBackend {}
- type SqlWriteT (m :: Type -> Type) a = forall backend. SqlBackendCanWrite backend => ReaderT backend m a
- 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
- data IsolationLevel
- 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 ()
- data SqliteConf
- = SqliteConf {
- sqlDatabase :: Text
- sqlPoolSize :: Int
- | SqliteConfInfo {
- sqlConnInfo :: SqliteConnectionInfo
- sqlPoolSize :: Int
- = SqliteConf {
- data SqliteConnectionInfo
- mkSqliteConnectionInfo :: Text -> SqliteConnectionInfo
- sqlConnectionStr :: Lens' SqliteConnectionInfo Text
- walEnabled :: Lens' SqliteConnectionInfo Bool
- fkEnabled :: Lens' SqliteConnectionInfo Bool
- extraPragmas :: Lens' SqliteConnectionInfo [Text]
- runSqlite :: MonadUnliftIO m => Text -> ReaderT SqlBackend (NoLoggingT (ResourceT m)) a -> m a
- runSqliteInfo :: MonadUnliftIO m => SqliteConnectionInfo -> ReaderT SqlBackend (NoLoggingT (ResourceT m)) a -> m a
- wrapConnection :: Connection -> LogFunc -> IO SqlBackend
- wrapConnectionInfo :: SqliteConnectionInfo -> Connection -> LogFunc -> IO SqlBackend
- mockMigration :: Migration -> IO ()
- retryOnBusy :: (MonadUnliftIO m, MonadLoggerIO m) => m a -> m a
- waitForDatabase :: forall (m :: Type -> Type) backend. (MonadUnliftIO m, MonadLoggerIO m, BackendCompatible SqlBackend backend) => ReaderT backend m ()
- data ForeignKeyViolation = ForeignKeyViolation {
- foreignKeyTable :: Text
- foreignKeyColumn :: Text
- foreignKeyRowId :: Int64
- checkForeignKeys :: forall (m :: Type -> Type) env. (MonadResource m, MonadReader env m, BackendCompatible SqlBackend env) => ConduitM () ForeignKeyViolation m ()
- data RawSqlite backend
- openRawSqliteConn :: (MonadUnliftIO m, MonadLoggerIO m) => SqliteConnectionInfo -> m (RawSqlite SqlBackend)
- persistentBackend :: forall backend1 backend2 f. Functor f => (backend1 -> f backend2) -> RawSqlite backend1 -> f (RawSqlite backend2)
- rawSqliteConnection :: forall backend f. Functor f => (Connection -> f Connection) -> RawSqlite backend -> f (RawSqlite backend)
- withRawSqliteConnInfo :: (MonadUnliftIO m, MonadLoggerIO m) => SqliteConnectionInfo -> (RawSqlite SqlBackend -> m a) -> m a
- createRawSqlitePoolFromInfo :: (MonadLoggerIO m, MonadUnliftIO m) => SqliteConnectionInfo -> (RawSqlite SqlBackend -> m ()) -> Int -> m (Pool (RawSqlite SqlBackend))
- createRawSqlitePoolFromInfo_ :: (MonadLoggerIO m, MonadUnliftIO m) => SqliteConnectionInfo -> Int -> m (Pool (RawSqlite SqlBackend))
- withRawSqlitePoolInfo :: (MonadUnliftIO m, MonadLoggerIO m) => SqliteConnectionInfo -> (RawSqlite SqlBackend -> m ()) -> Int -> (Pool (RawSqlite SqlBackend) -> m a) -> m a
- withRawSqlitePoolInfo_ :: (MonadUnliftIO m, MonadLoggerIO m) => SqliteConnectionInfo -> Int -> (Pool (RawSqlite SqlBackend) -> m a) -> m a
Documentation
Arguments
:: (MonadUnliftIO m, MonadLoggerIO m) | |
=> Text | |
-> Int | number of connections to open |
-> (Pool SqlBackend -> m a) | |
-> m a |
Run the given action with a connection pool.
Like createSqlitePool
, this should not be used with :memory:
.
Arguments
:: (MonadUnliftIO m, MonadLoggerIO m) | |
=> SqliteConnectionInfo | |
-> Int | number of connections to open |
-> (Pool SqlBackend -> m a) | |
-> m a |
Run the given action with a connection pool.
Like createSqlitePool
, this should not be used with :memory:
.
Since: 2.6.2
withSqliteConn :: (MonadUnliftIO m, MonadLoggerIO m) => Text -> (SqlBackend -> m a) -> m a Source #
withSqliteConnInfo :: (MonadUnliftIO m, MonadLoggerIO m) => SqliteConnectionInfo -> (SqlBackend -> m a) -> m a Source #
Since: 2.6.2
createSqlitePool :: (MonadLoggerIO m, MonadUnliftIO m) => Text -> Int -> m (Pool SqlBackend) Source #
Create a pool of SQLite connections.
Note that this should not be used with the :memory:
connection string, as
the pool will regularly remove connections, destroying your database.
Instead, use withSqliteConn
.
createSqlitePoolFromInfo :: (MonadLoggerIO m, MonadUnliftIO m) => SqliteConnectionInfo -> Int -> m (Pool SqlBackend) Source #
Create a pool of SQLite connections.
Note that this should not be used with the :memory:
connection string, as
the pool will regularly remove connections, destroying your database.
Instead, use withSqliteConn
.
Since: 2.6.2
createSqlitePoolWithConfig Source #
Arguments
:: (MonadUnliftIO m, MonadLoggerIO m) | |
=> Text | connection string |
-> ConnectionPoolConfig | |
-> m (Pool SqlBackend) |
Create a pool of SQLite connections.
Since: 2.13.4.0
Constructors
Statement | |
Fields
|
data PersistValue #
Constructors
PersistText Text | |
PersistByteString ByteString | |
PersistInt64 Int64 | |
PersistDouble Double | |
PersistRational Rational | |
PersistBool Bool | |
PersistDay Day | |
PersistTimeOfDay TimeOfDay | |
PersistUTCTime UTCTime | |
PersistNull | |
PersistList [PersistValue] | |
PersistMap [(Text, PersistValue)] | |
PersistObjectId ByteString | |
PersistArray [PersistValue] | |
PersistLiteral_ LiteralType ByteString |
Bundled Patterns
pattern PersistDbSpecific :: ByteString -> PersistValue | |
pattern PersistLiteral :: ByteString -> PersistValue | |
pattern PersistLiteralEscaped :: ByteString -> PersistValue |
Instances
listToJSON :: [PersistValue] -> Text #
mapToJSON :: [(Text, PersistValue)] -> Text #
data LiteralType #
Constructors
Escaped | |
Unescaped | |
DbSpecific |
Instances
Read LiteralType | |
Defined in Database.Persist.PersistValue Methods readsPrec :: Int -> ReadS LiteralType readList :: ReadS [LiteralType] readPrec :: ReadPrec LiteralType readListPrec :: ReadPrec [LiteralType] | |
Show LiteralType | |
Defined in Database.Persist.PersistValue Methods showsPrec :: Int -> LiteralType -> ShowS show :: LiteralType -> String showList :: [LiteralType] -> ShowS | |
Eq LiteralType | |
Defined in Database.Persist.PersistValue | |
Ord LiteralType | |
Defined in Database.Persist.PersistValue Methods compare :: LiteralType -> LiteralType -> Ordering (<) :: LiteralType -> LiteralType -> Bool (<=) :: LiteralType -> LiteralType -> Bool (>) :: LiteralType -> LiteralType -> Bool (>=) :: LiteralType -> LiteralType -> Bool max :: LiteralType -> LiteralType -> LiteralType min :: LiteralType -> LiteralType -> LiteralType |
data SqlBackend #
Instances
HasPersistBackend SqlBackend | |||||
Defined in Database.Persist.SqlBackend.Internal Associated Types
Methods | |||||
IsPersistBackend SqlBackend | |||||
Defined in Database.Persist.SqlBackend.Internal Methods | |||||
newtype BackendKey SqlBackend | |||||
Defined in Database.Persist.Sql.Orphan.PersistStore | |||||
type BaseBackend SqlBackend | |||||
Defined in Database.Persist.SqlBackend.Internal | |||||
type Rep (BackendKey SqlBackend) | |||||
Defined in Database.Persist.Sql.Orphan.PersistStore type Rep (BackendKey SqlBackend) = D1 ('MetaData "BackendKey" "Database.Persist.Sql.Orphan.PersistStore" "persistent-2.14.6.3-4rUXkEyv9IqGc70msb2CM1" 'True) (C1 ('MetaCons "SqlBackendKey" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSqlBackendKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int64))) |
data PersistFilter #
Instances
Read PersistFilter | |
Defined in Database.Persist.Types.Base Methods readsPrec :: Int -> ReadS PersistFilter readList :: ReadS [PersistFilter] readPrec :: ReadPrec PersistFilter readListPrec :: ReadPrec [PersistFilter] | |
Show PersistFilter | |
Defined in Database.Persist.Types.Base Methods showsPrec :: Int -> PersistFilter -> ShowS show :: PersistFilter -> String showList :: [PersistFilter] -> ShowS | |
Lift PersistFilter | |
Defined in Database.Persist.Types.Base Methods lift :: Quote m => PersistFilter -> m Exp liftTyped :: forall (m :: Type -> Type). Quote m => PersistFilter -> Code m PersistFilter |
class (PersistCore backend, PersistStoreRead backend) => PersistQueryRead backend where #
Minimal complete definition
Methods
selectSourceRes :: forall record (m1 :: Type -> Type) (m2 :: Type -> Type). (PersistRecordBackend record backend, MonadIO m1, MonadIO m2) => [Filter record] -> [SelectOpt record] -> ReaderT backend m1 (Acquire (ConduitM () (Entity record) m2 ())) #
selectFirst :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record backend) => [Filter record] -> [SelectOpt record] -> ReaderT backend m (Maybe (Entity record)) #
selectKeysRes :: forall (m1 :: Type -> Type) (m2 :: Type -> Type) record. (MonadIO m1, MonadIO m2, PersistRecordBackend record backend) => [Filter record] -> [SelectOpt record] -> ReaderT backend m1 (Acquire (ConduitM () (Key record) m2 ())) #
count :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record backend) => [Filter record] -> ReaderT backend m Int #
exists :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record backend) => [Filter record] -> ReaderT backend m Bool #
Instances
(HasPersistBackend b, PersistQueryRead b) => PersistQueryRead (RawSqlite b) Source # | |
Defined in Database.Persist.Sqlite Methods selectSourceRes :: forall record (m1 :: Type -> Type) (m2 :: Type -> Type). (PersistRecordBackend record (RawSqlite b), MonadIO m1, MonadIO m2) => [Filter record] -> [SelectOpt record] -> ReaderT (RawSqlite b) m1 (Acquire (ConduitM () (Entity record) m2 ())) # selectFirst :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record (RawSqlite b)) => [Filter record] -> [SelectOpt record] -> ReaderT (RawSqlite b) m (Maybe (Entity record)) # selectKeysRes :: forall (m1 :: Type -> Type) (m2 :: Type -> Type) record. (MonadIO m1, MonadIO m2, PersistRecordBackend record (RawSqlite b)) => [Filter record] -> [SelectOpt record] -> ReaderT (RawSqlite b) m1 (Acquire (ConduitM () (Key record) m2 ())) # count :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record (RawSqlite b)) => [Filter record] -> ReaderT (RawSqlite b) m Int # exists :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record (RawSqlite b)) => [Filter record] -> ReaderT (RawSqlite b) m Bool # | |
(HasPersistBackend b, BackendCompatible b s, PersistQueryRead b) => PersistQueryRead (Compatible b s) | |
Defined in Database.Persist.Compatible.Types Methods selectSourceRes :: forall record (m1 :: Type -> Type) (m2 :: Type -> Type). (PersistRecordBackend record (Compatible b s), MonadIO m1, MonadIO m2) => [Filter record] -> [SelectOpt record] -> ReaderT (Compatible b s) m1 (Acquire (ConduitM () (Entity record) m2 ())) # selectFirst :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record (Compatible b s)) => [Filter record] -> [SelectOpt record] -> ReaderT (Compatible b s) m (Maybe (Entity record)) # selectKeysRes :: forall (m1 :: Type -> Type) (m2 :: Type -> Type) record. (MonadIO m1, MonadIO m2, PersistRecordBackend record (Compatible b s)) => [Filter record] -> [SelectOpt record] -> ReaderT (Compatible b s) m1 (Acquire (ConduitM () (Key record) m2 ())) # count :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record (Compatible b s)) => [Filter record] -> ReaderT (Compatible b s) m Int # exists :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record (Compatible b s)) => [Filter record] -> ReaderT (Compatible b s) m Bool # |
class (Show (BackendKey backend), Read (BackendKey backend), Eq (BackendKey backend), Ord (BackendKey backend), PersistStoreRead backend, PersistField (BackendKey backend), ToJSON (BackendKey backend), FromJSON (BackendKey backend)) => PersistStoreWrite backend where #
Methods
insert :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend, SafeToInsert record) => record -> ReaderT backend m (Key record) #
insert_ :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend, SafeToInsert record) => record -> ReaderT backend m () #
insertMany :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend, SafeToInsert record) => [record] -> ReaderT backend m [Key record] #
insertMany_ :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend, SafeToInsert record) => [record] -> ReaderT backend m () #
insertEntityMany :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend) => [Entity record] -> ReaderT backend m () #
insertKey :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend) => Key record -> record -> ReaderT backend m () #
repsert :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend) => Key record -> record -> ReaderT backend m () #
repsertMany :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend) => [(Key record, record)] -> ReaderT backend m () #
replace :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend) => Key record -> record -> ReaderT backend m () #
delete :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend) => Key record -> ReaderT backend m () #
update :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend) => Key record -> [Update record] -> ReaderT backend m () #
updateGet :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend) => Key record -> [Update record] -> ReaderT backend m record #
Instances
(HasPersistBackend b, PersistStoreWrite b) => PersistStoreWrite (RawSqlite b) Source # | |
Defined in Database.Persist.Sqlite Methods insert :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b), SafeToInsert record) => record -> ReaderT (RawSqlite b) m (Key record) # insert_ :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b), SafeToInsert record) => record -> ReaderT (RawSqlite b) m () # insertMany :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b), SafeToInsert record) => [record] -> ReaderT (RawSqlite b) m [Key record] # insertMany_ :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b), SafeToInsert record) => [record] -> ReaderT (RawSqlite b) m () # insertEntityMany :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b)) => [Entity record] -> ReaderT (RawSqlite b) m () # insertKey :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b)) => Key record -> record -> ReaderT (RawSqlite b) m () # repsert :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b)) => Key record -> record -> ReaderT (RawSqlite b) m () # repsertMany :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b)) => [(Key record, record)] -> ReaderT (RawSqlite b) m () # replace :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b)) => Key record -> record -> ReaderT (RawSqlite b) m () # delete :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b)) => Key record -> ReaderT (RawSqlite b) m () # update :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b)) => Key record -> [Update record] -> ReaderT (RawSqlite b) m () # updateGet :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b)) => Key record -> [Update record] -> ReaderT (RawSqlite b) m record # | |
(HasPersistBackend b, BackendCompatible b s, PersistStoreWrite b) => PersistStoreWrite (Compatible b s) | |
Defined in Database.Persist.Compatible.Types Methods insert :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (Compatible b s), SafeToInsert record) => record -> ReaderT (Compatible b s) m (Key record) # insert_ :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (Compatible b s), SafeToInsert record) => record -> ReaderT (Compatible b s) m () # insertMany :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (Compatible b s), SafeToInsert record) => [record] -> ReaderT (Compatible b s) m [Key record] # insertMany_ :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (Compatible b s), SafeToInsert record) => [record] -> ReaderT (Compatible b s) m () # insertEntityMany :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (Compatible b s)) => [Entity record] -> ReaderT (Compatible b s) m () # insertKey :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (Compatible b s)) => Key record -> record -> ReaderT (Compatible b s) m () # repsert :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (Compatible b s)) => Key record -> record -> ReaderT (Compatible b s) m () # repsertMany :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (Compatible b s)) => [(Key record, record)] -> ReaderT (Compatible b s) m () # replace :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (Compatible b s)) => Key record -> record -> ReaderT (Compatible b s) m () # delete :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (Compatible b s)) => Key record -> ReaderT (Compatible b s) m () # update :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (Compatible b s)) => Key record -> [Update record] -> ReaderT (Compatible b s) m () # updateGet :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (Compatible b s)) => Key record -> [Update record] -> ReaderT (Compatible b s) m record # |
type PersistQuery a = PersistQueryWrite a #
type PersistStore a = PersistStoreWrite a #
type PersistUnique a = PersistUniqueWrite a #
class PersistConfig c where #
Minimal complete definition
Associated Types
type PersistConfigBackend c :: (Type -> Type) -> Type -> Type #
type PersistConfigPool c #
Methods
loadConfig :: Value -> Parser c #
createPoolConfig :: c -> IO (PersistConfigPool c) #
runPool :: MonadUnliftIO m => c -> PersistConfigBackend c m a -> PersistConfigPool c -> m a #
Instances
type family PersistConfigBackend c :: (Type -> Type) -> Type -> Type #
Instances
type PersistConfigBackend SqliteConf Source # | |
Defined in Database.Persist.Sqlite | |
type PersistConfigBackend (Either c1 c2) | |
Defined in Database.Persist.Class.PersistConfig |
type family PersistConfigPool c #
Instances
type PersistConfigPool SqliteConf Source # | |
Defined in Database.Persist.Sqlite | |
type PersistConfigPool (Either c1 c2) | |
Defined in Database.Persist.Class.PersistConfig |
Constructors
Asc (EntityField record typ) | |
Desc (EntityField record typ) | |
OffsetBy Int | |
LimitTo Int |
Constructors
PersistField typ => Filter | |
Fields
| |
FilterAnd [Filter record] | |
FilterOr [Filter record] | |
BackendFilter (BackendSpecificFilter (PersistEntityBackend record) record) |
type family BackendSpecificFilter backend record #
type family BackendSpecificUpdate backend record #
data PersistUpdate #
Instances
Read PersistUpdate | |
Defined in Database.Persist.Types.Base Methods readsPrec :: Int -> ReadS PersistUpdate readList :: ReadS [PersistUpdate] readPrec :: ReadPrec PersistUpdate readListPrec :: ReadPrec [PersistUpdate] | |
Show PersistUpdate | |
Defined in Database.Persist.Types.Base Methods showsPrec :: Int -> PersistUpdate -> ShowS show :: PersistUpdate -> String showList :: [PersistUpdate] -> ShowS | |
Lift PersistUpdate | |
Defined in Database.Persist.Types.Base Methods lift :: Quote m => PersistUpdate -> m Exp liftTyped :: forall (m :: Type -> Type). Quote m => PersistUpdate -> Code m PersistUpdate |
Constructors
PersistField typ => Update | |
Fields
| |
BackendUpdate (BackendSpecificUpdate (PersistEntityBackend record) record) |
Instances
(Generic (Key record), Generic record) => Generic (Entity record) | |||||
Defined in Database.Persist.Class.PersistEntity Associated Types
| |||||
(Read (Key record), Read record) => Read (Entity record) | |||||
Defined in Database.Persist.Class.PersistEntity | |||||
(Show (Key record), Show record) => Show (Entity record) | |||||
(Eq (Key record), Eq record) => Eq (Entity record) | |||||
(Ord (Key record), Ord record) => Ord (Entity record) | |||||
Defined in Database.Persist.Class.PersistEntity | |||||
(TypeError (EntityErrorMessage a) :: Constraint) => SafeToInsert (Entity a) | |||||
Defined in Database.Persist.Class.PersistEntity | |||||
(PersistEntity record, PersistField record, PersistField (Key record)) => PersistField (Entity record) | |||||
Defined in Database.Persist.Class.PersistEntity Methods toPersistValue :: Entity record -> PersistValue # fromPersistValue :: PersistValue -> Either Text (Entity record) # | |||||
(PersistField record, PersistEntity record) => PersistFieldSql (Entity record) | |||||
Defined in Database.Persist.Sql.Class | |||||
(PersistEntity record, PersistEntityBackend record ~ backend, IsPersistBackend backend) => RawSql (Entity record) | |||||
Defined in Database.Persist.Sql.Class Methods rawSqlCols :: (Text -> Text) -> Entity record -> (Int, [Text]) # rawSqlColCountReason :: Entity record -> String # rawSqlProcessRow :: [PersistValue] -> Either Text (Entity record) # | |||||
type Rep (Entity record) | |||||
Defined in Database.Persist.Class.PersistEntity type Rep (Entity record) = D1 ('MetaData "Entity" "Database.Persist.Class.PersistEntity" "persistent-2.14.6.3-4rUXkEyv9IqGc70msb2CM1" 'False) (C1 ('MetaCons "Entity" 'PrefixI 'True) (S1 ('MetaSel ('Just "entityKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Key record)) :*: S1 ('MetaSel ('Just "entityVal") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 record))) |
class (PersistField (Key record), ToJSON (Key record), FromJSON (Key record), Show (Key record), Read (Key record), Eq (Key record), Ord (Key record)) => PersistEntity record where #
Minimal complete definition
keyToValues, keyFromValues, persistIdField, entityDef, persistFieldDef, toPersistFields, fromPersistValues, tabulateEntityA, persistUniqueKeys, persistUniqueToFieldNames, persistUniqueToValues, fieldLens
Methods
keyToValues :: Key record -> [PersistValue] #
keyFromValues :: [PersistValue] -> Either Text (Key record) #
persistIdField :: EntityField record (Key record) #
entityDef :: proxy record -> EntityDef #
persistFieldDef :: EntityField record typ -> FieldDef #
toPersistFields :: record -> [PersistValue] #
fromPersistValues :: [PersistValue] -> Either Text record #
tabulateEntityA :: Applicative f => (forall a. EntityField record a -> f a) -> f (Entity record) #
persistUniqueKeys :: record -> [Unique record] #
persistUniqueToFieldNames :: Unique record -> NonEmpty (FieldNameHS, FieldNameDB) #
persistUniqueToValues :: Unique record -> [PersistValue] #
fieldLens :: EntityField record field -> forall (f :: Type -> Type). Functor f => (field -> f field) -> Entity record -> f (Entity record) #
keyFromRecordM :: Maybe (record -> Key record) #
data family EntityField record :: Type -> Type #
Instances
SymbolToField sym rec typ => IsLabel sym (EntityField rec typ) | |
Defined in Database.Persist.Class.PersistEntity Methods fromLabel :: EntityField rec typ |
data FilterValue typ where #
Constructors
FilterValue :: forall typ. typ -> FilterValue typ | |
FilterValues :: forall typ. [typ] -> FilterValue typ | |
UnsafeValue :: forall a typ. PersistField a => a -> FilterValue typ |
Instances
(PersistEntity a, PersistEntityBackend a ~ backend, IsPersistBackend backend) => RawSql (Key a) | |
Defined in Database.Persist.Sql.Class Methods rawSqlCols :: (Text -> Text) -> Key a -> (Int, [Text]) # rawSqlColCountReason :: Key a -> String # rawSqlProcessRow :: [PersistValue] -> Either Text (Key a) # |
type family PersistEntityBackend record #
class SafeToInsert a #
Instances
(TypeError (EntityErrorMessage a) :: Constraint) => SafeToInsert (Entity a) | |
Defined in Database.Persist.Class.PersistEntity | |
(TypeError (FunctionErrorMessage a b) :: Constraint) => SafeToInsert (a -> b) | |
Defined in Database.Persist.Class.PersistEntity |
class SymbolToField (sym :: Symbol) rec typ | sym rec -> typ where #
Methods
symbolToField :: EntityField rec typ #
entityIdFromJSON :: (PersistEntity record, FromJSON record) => Value -> Parser (Entity record) #
entityIdToJSON :: (PersistEntity record, ToJSON record) => Entity record -> Value #
entityValues :: PersistEntity record => Entity record -> [PersistValue] #
fromPersistValueJSON :: FromJSON a => PersistValue -> Either Text a #
keyValueEntityFromJSON :: (PersistEntity record, FromJSON record) => Value -> Parser (Entity record) #
keyValueEntityToJSON :: (PersistEntity record, ToJSON record) => Entity record -> Value #
tabulateEntity :: PersistEntity record => (forall a. EntityField record a -> a) -> Entity record #
toPersistValueJSON :: ToJSON a => a -> PersistValue #
newtype OverflowNatural #
Constructors
OverflowNatural | |
Fields
|
Instances
Num OverflowNatural | |
Defined in Database.Persist.Class.PersistField Methods (+) :: OverflowNatural -> OverflowNatural -> OverflowNatural (-) :: OverflowNatural -> OverflowNatural -> OverflowNatural (*) :: OverflowNatural -> OverflowNatural -> OverflowNatural negate :: OverflowNatural -> OverflowNatural abs :: OverflowNatural -> OverflowNatural signum :: OverflowNatural -> OverflowNatural fromInteger :: Integer -> OverflowNatural | |
Show OverflowNatural | |
Defined in Database.Persist.Class.PersistField Methods showsPrec :: Int -> OverflowNatural -> ShowS show :: OverflowNatural -> String showList :: [OverflowNatural] -> ShowS | |
Eq OverflowNatural | |
Defined in Database.Persist.Class.PersistField Methods (==) :: OverflowNatural -> OverflowNatural -> Bool (/=) :: OverflowNatural -> OverflowNatural -> Bool | |
Ord OverflowNatural | |
Defined in Database.Persist.Class.PersistField Methods compare :: OverflowNatural -> OverflowNatural -> Ordering (<) :: OverflowNatural -> OverflowNatural -> Bool (<=) :: OverflowNatural -> OverflowNatural -> Bool (>) :: OverflowNatural -> OverflowNatural -> Bool (>=) :: OverflowNatural -> OverflowNatural -> Bool max :: OverflowNatural -> OverflowNatural -> OverflowNatural min :: OverflowNatural -> OverflowNatural -> OverflowNatural | |
PersistField OverflowNatural | |
Defined in Database.Persist.Class.PersistField Methods toPersistValue :: OverflowNatural -> PersistValue # fromPersistValue :: PersistValue -> Either Text OverflowNatural # | |
PersistFieldSql OverflowNatural | |
Defined in Database.Persist.Sql.Class Methods sqlType :: Proxy OverflowNatural -> SqlType # |
class PersistField a where #
Instances
PersistField Int16 | |
Defined in Database.Persist.Class.PersistField Methods toPersistValue :: Int16 -> PersistValue # fromPersistValue :: PersistValue -> Either Text Int16 # | |
PersistField Int32 | |
Defined in Database.Persist.Class.PersistField Methods toPersistValue :: Int32 -> PersistValue # fromPersistValue :: PersistValue -> Either Text Int32 # | |
PersistField Int64 | |
Defined in Database.Persist.Class.PersistField Methods toPersistValue :: Int64 -> PersistValue # fromPersistValue :: PersistValue -> Either Text Int64 # | |
PersistField Int8 | |
Defined in Database.Persist.Class.PersistField Methods toPersistValue :: Int8 -> PersistValue # fromPersistValue :: PersistValue -> Either Text Int8 # | |
PersistField Rational | |
Defined in Database.Persist.Class.PersistField Methods toPersistValue :: Rational -> PersistValue # fromPersistValue :: PersistValue -> Either Text Rational # | |
PersistField Word16 | |
Defined in Database.Persist.Class.PersistField Methods toPersistValue :: Word16 -> PersistValue # fromPersistValue :: PersistValue -> Either Text Word16 # | |
PersistField Word32 | |
Defined in Database.Persist.Class.PersistField Methods toPersistValue :: Word32 -> PersistValue # fromPersistValue :: PersistValue -> Either Text Word32 # | |
PersistField Word64 | |
Defined in Database.Persist.Class.PersistField Methods toPersistValue :: Word64 -> PersistValue # fromPersistValue :: PersistValue -> Either Text Word64 # | |
PersistField Word8 | |
Defined in Database.Persist.Class.PersistField Methods toPersistValue :: Word8 -> PersistValue # fromPersistValue :: PersistValue -> Either Text Word8 # | |
PersistField Html | |
Defined in Database.Persist.Class.PersistField Methods toPersistValue :: Html -> PersistValue # fromPersistValue :: PersistValue -> Either Text Html # | |
PersistField ByteString | |
Defined in Database.Persist.Class.PersistField Methods toPersistValue :: ByteString -> PersistValue # fromPersistValue :: PersistValue -> Either Text ByteString # | |
PersistField OverflowNatural | |
Defined in Database.Persist.Class.PersistField Methods toPersistValue :: OverflowNatural -> PersistValue # fromPersistValue :: PersistValue -> Either Text OverflowNatural # | |
PersistField PersistValue | |
Defined in Database.Persist.Class.PersistField Methods toPersistValue :: PersistValue -> PersistValue # fromPersistValue :: PersistValue -> Either Text PersistValue # | |
PersistField Checkmark | |
Defined in Database.Persist.Class.PersistField Methods toPersistValue :: Checkmark -> PersistValue # fromPersistValue :: PersistValue -> Either Text Checkmark # | |
PersistField Text | |
Defined in Database.Persist.Class.PersistField Methods toPersistValue :: Text -> PersistValue # fromPersistValue :: PersistValue -> Either Text Text # | |
PersistField Text | |
Defined in Database.Persist.Class.PersistField Methods toPersistValue :: Text -> PersistValue # fromPersistValue :: PersistValue -> Either Text Text # | |
PersistField Day | |
Defined in Database.Persist.Class.PersistField | |
PersistField UTCTime | |
Defined in Database.Persist.Class.PersistField Methods toPersistValue :: UTCTime -> PersistValue # fromPersistValue :: PersistValue -> Either Text UTCTime # | |
PersistField TimeOfDay | |
Defined in Database.Persist.Class.PersistField Methods toPersistValue :: TimeOfDay -> PersistValue # fromPersistValue :: PersistValue -> Either Text TimeOfDay # | |
(TypeError ((((('Text "The instance of PersistField for the Natural type was removed." ':$$: 'Text "Please see the documentation for OverflowNatural if you want to ") ':$$: 'Text "continue using the old behavior or want to see documentation on ") ':$$: 'Text "why the instance was removed.") ':$$: 'Text "") ':$$: 'Text "This error instance will be removed in a future release.") :: Constraint) => PersistField Natural | |
Defined in Database.Persist.Class.PersistField Methods toPersistValue :: Natural -> PersistValue # fromPersistValue :: PersistValue -> Either Text Natural # | |
PersistField Bool | |
Defined in Database.Persist.Class.PersistField Methods toPersistValue :: Bool -> PersistValue # fromPersistValue :: PersistValue -> Either Text Bool # | |
PersistField Double | |
Defined in Database.Persist.Class.PersistField Methods toPersistValue :: Double -> PersistValue # fromPersistValue :: PersistValue -> Either Text Double # | |
PersistField Int | |
Defined in Database.Persist.Class.PersistField | |
PersistField Word | |
Defined in Database.Persist.Class.PersistField Methods toPersistValue :: Word -> PersistValue # fromPersistValue :: PersistValue -> Either Text Word # | |
PersistField v => PersistField (IntMap v) | |
Defined in Database.Persist.Class.PersistField Methods toPersistValue :: IntMap v -> PersistValue # fromPersistValue :: PersistValue -> Either Text (IntMap v) # | |
(Ord a, PersistField a) => PersistField (Set a) | |
Defined in Database.Persist.Class.PersistField Methods toPersistValue :: Set a -> PersistValue # fromPersistValue :: PersistValue -> Either Text (Set a) # | |
(PersistEntity record, PersistField record, PersistField (Key record)) => PersistField (Entity record) | |
Defined in Database.Persist.Class.PersistEntity Methods toPersistValue :: Entity record -> PersistValue # fromPersistValue :: PersistValue -> Either Text (Entity record) # | |
(BackendCompatible b s, PersistField (BackendKey b)) => PersistField (BackendKey (Compatible b s)) | |
Defined in Database.Persist.Compatible.Types Methods toPersistValue :: BackendKey (Compatible b s) -> PersistValue # fromPersistValue :: PersistValue -> Either Text (BackendKey (Compatible b s)) # | |
(PersistCore b, PersistCore (RawSqlite b), PersistField (BackendKey b)) => PersistField (BackendKey (RawSqlite b)) Source # | |
Defined in Database.Persist.Sqlite Methods toPersistValue :: BackendKey (RawSqlite b) -> PersistValue # fromPersistValue :: PersistValue -> Either Text (BackendKey (RawSqlite b)) # | |
PersistField a => PersistField (Vector a) | |
Defined in Database.Persist.Class.PersistField Methods toPersistValue :: Vector a -> PersistValue # fromPersistValue :: PersistValue -> Either Text (Vector a) # | |
PersistField a => PersistField (Maybe a) | |
Defined in Database.Persist.Class.PersistField Methods toPersistValue :: Maybe a -> PersistValue # fromPersistValue :: PersistValue -> Either Text (Maybe a) # | |
PersistField [Char] | |
Defined in Database.Persist.Class.PersistField Methods toPersistValue :: [Char] -> PersistValue # fromPersistValue :: PersistValue -> Either Text [Char] # | |
PersistField a => PersistField [a] | |
Defined in Database.Persist.Class.PersistField | |
HasResolution a => PersistField (Fixed a) | |
Defined in Database.Persist.Class.PersistField Methods toPersistValue :: Fixed a -> PersistValue # fromPersistValue :: PersistValue -> Either Text (Fixed a) # | |
PersistField v => PersistField (Map Text v) | |
Defined in Database.Persist.Class.PersistField Methods toPersistValue :: Map Text v -> PersistValue # fromPersistValue :: PersistValue -> Either Text (Map Text v) # | |
(PersistField a, PersistField b) => PersistField (a, b) | |
Defined in Database.Persist.Class.PersistField Methods toPersistValue :: (a, b) -> PersistValue # fromPersistValue :: PersistValue -> Either Text (a, b) # |
getPersistMap :: PersistValue -> Either Text [(Text, PersistValue)] #
class (PersistQueryRead backend, PersistStoreWrite backend) => PersistQueryWrite backend where #
Methods
updateWhere :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record backend) => [Filter record] -> [Update record] -> ReaderT backend m () #
deleteWhere :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record backend) => [Filter record] -> ReaderT backend m () #
Instances
(HasPersistBackend b, PersistQueryWrite b) => PersistQueryWrite (RawSqlite b) Source # | |
Defined in Database.Persist.Sqlite Methods updateWhere :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record (RawSqlite b)) => [Filter record] -> [Update record] -> ReaderT (RawSqlite b) m () # deleteWhere :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record (RawSqlite b)) => [Filter record] -> ReaderT (RawSqlite b) m () # | |
(HasPersistBackend b, BackendCompatible b s, PersistQueryWrite b) => PersistQueryWrite (Compatible b s) | |
Defined in Database.Persist.Compatible.Types Methods updateWhere :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record (Compatible b s)) => [Filter record] -> [Update record] -> ReaderT (Compatible b s) m () # deleteWhere :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record (Compatible b s)) => [Filter record] -> ReaderT (Compatible b s) m () # |
selectKeys :: forall record backend (m :: Type -> Type). (PersistQueryRead backend, MonadResource m, PersistRecordBackend record backend, MonadReader backend m) => [Filter record] -> [SelectOpt record] -> ConduitM () (Key record) m () #
selectKeysList :: forall record backend (m :: Type -> Type). (MonadIO m, PersistQueryRead backend, PersistRecordBackend record backend) => [Filter record] -> [SelectOpt record] -> ReaderT backend m [Key record] #
selectList :: forall record backend (m :: Type -> Type). (MonadIO m, PersistQueryRead backend, PersistRecordBackend record backend) => [Filter record] -> [SelectOpt record] -> ReaderT backend m [Entity record] #
selectSource :: forall record backend (m :: Type -> Type). (PersistQueryRead backend, MonadResource m, PersistRecordBackend record backend, MonadReader backend m) => [Filter record] -> [SelectOpt record] -> ConduitM () (Entity record) m () #
class BackendCompatible sup sub where #
Methods
projectBackend :: sub -> sup #
Instances
BackendCompatible b (RawSqlite b) Source # | |
Defined in Database.Persist.Sqlite Methods projectBackend :: RawSqlite b -> b # |
class PersistCore backend #
Associated Types
data BackendKey backend #
Instances
PersistCore b => PersistCore (RawSqlite b) Source # | |||||
Defined in Database.Persist.Sqlite Associated Types
| |||||
(BackendCompatible b s, PersistCore b) => PersistCore (Compatible b s) | |||||
Defined in Database.Persist.Compatible.Types Associated Types
|
data family BackendKey backend #
Instances
(BackendCompatible b s, FromJSON (BackendKey b)) => FromJSON (BackendKey (Compatible b s)) | |
Defined in Database.Persist.Compatible.Types Methods parseJSON :: Value -> Parser (BackendKey (Compatible b s)) parseJSONList :: Value -> Parser [BackendKey (Compatible b s)] omittedField :: Maybe (BackendKey (Compatible b s)) | |
(PersistCore b, PersistCore (RawSqlite b), FromJSON (BackendKey b)) => FromJSON (BackendKey (RawSqlite b)) | |
Defined in Database.Persist.Sqlite Methods parseJSON :: Value -> Parser (BackendKey (RawSqlite b)) parseJSONList :: Value -> Parser [BackendKey (RawSqlite b)] omittedField :: Maybe (BackendKey (RawSqlite b)) | |
(BackendCompatible b s, ToJSON (BackendKey b)) => ToJSON (BackendKey (Compatible b s)) | |
Defined in Database.Persist.Compatible.Types Methods toJSON :: BackendKey (Compatible b s) -> Value toEncoding :: BackendKey (Compatible b s) -> Encoding toJSONList :: [BackendKey (Compatible b s)] -> Value toEncodingList :: [BackendKey (Compatible b s)] -> Encoding omitField :: BackendKey (Compatible b s) -> Bool | |
(PersistCore b, PersistCore (RawSqlite b), ToJSON (BackendKey b)) => ToJSON (BackendKey (RawSqlite b)) | |
Defined in Database.Persist.Sqlite Methods toJSON :: BackendKey (RawSqlite b) -> Value toEncoding :: BackendKey (RawSqlite b) -> Encoding toJSONList :: [BackendKey (RawSqlite b)] -> Value toEncodingList :: [BackendKey (RawSqlite b)] -> Encoding omitField :: BackendKey (RawSqlite b) -> Bool | |
(BackendCompatible b s, Bounded (BackendKey b)) => Bounded (BackendKey (Compatible b s)) | |
Defined in Database.Persist.Compatible.Types | |
(PersistCore b, PersistCore (RawSqlite b), Bounded (BackendKey b)) => Bounded (BackendKey (RawSqlite b)) | |
Defined in Database.Persist.Sqlite | |
(BackendCompatible b s, Enum (BackendKey b)) => Enum (BackendKey (Compatible b s)) | |
Defined in Database.Persist.Compatible.Types Methods succ :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) pred :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) toEnum :: Int -> BackendKey (Compatible b s) fromEnum :: BackendKey (Compatible b s) -> Int enumFrom :: BackendKey (Compatible b s) -> [BackendKey (Compatible b s)] enumFromThen :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> [BackendKey (Compatible b s)] enumFromTo :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> [BackendKey (Compatible b s)] enumFromThenTo :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> [BackendKey (Compatible b s)] | |
(PersistCore b, PersistCore (RawSqlite b), Enum (BackendKey b)) => Enum (BackendKey (RawSqlite b)) | |
Defined in Database.Persist.Sqlite Methods succ :: BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) pred :: BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) toEnum :: Int -> BackendKey (RawSqlite b) fromEnum :: BackendKey (RawSqlite b) -> Int enumFrom :: BackendKey (RawSqlite b) -> [BackendKey (RawSqlite b)] enumFromThen :: BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) -> [BackendKey (RawSqlite b)] enumFromTo :: BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) -> [BackendKey (RawSqlite b)] enumFromThenTo :: BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) -> [BackendKey (RawSqlite b)] | |
(BackendCompatible b s, Num (BackendKey b)) => Num (BackendKey (Compatible b s)) | |
Defined in Database.Persist.Compatible.Types Methods (+) :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> BackendKey (Compatible b s) (-) :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> BackendKey (Compatible b s) (*) :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> BackendKey (Compatible b s) negate :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) abs :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) signum :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) fromInteger :: Integer -> BackendKey (Compatible b s) | |
(PersistCore b, PersistCore (RawSqlite b), Num (BackendKey b)) => Num (BackendKey (RawSqlite b)) | |
Defined in Database.Persist.Sqlite Methods (+) :: BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) (-) :: BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) (*) :: BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) negate :: BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) abs :: BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) signum :: BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) fromInteger :: Integer -> BackendKey (RawSqlite b) | |
(BackendCompatible b s, Read (BackendKey b)) => Read (BackendKey (Compatible b s)) | |
Defined in Database.Persist.Compatible.Types Methods readsPrec :: Int -> ReadS (BackendKey (Compatible b s)) readList :: ReadS [BackendKey (Compatible b s)] readPrec :: ReadPrec (BackendKey (Compatible b s)) readListPrec :: ReadPrec [BackendKey (Compatible b s)] | |
(PersistCore b, PersistCore (RawSqlite b), Read (BackendKey b)) => Read (BackendKey (RawSqlite b)) | |
Defined in Database.Persist.Sqlite Methods readsPrec :: Int -> ReadS (BackendKey (RawSqlite b)) readList :: ReadS [BackendKey (RawSqlite b)] readPrec :: ReadPrec (BackendKey (RawSqlite b)) readListPrec :: ReadPrec [BackendKey (RawSqlite b)] | |
(BackendCompatible b s, Integral (BackendKey b)) => Integral (BackendKey (Compatible b s)) | |
Defined in Database.Persist.Compatible.Types Methods quot :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> BackendKey (Compatible b s) rem :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> BackendKey (Compatible b s) div :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> BackendKey (Compatible b s) mod :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> BackendKey (Compatible b s) quotRem :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> (BackendKey (Compatible b s), BackendKey (Compatible b s)) divMod :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> (BackendKey (Compatible b s), BackendKey (Compatible b s)) toInteger :: BackendKey (Compatible b s) -> Integer | |
(PersistCore b, PersistCore (RawSqlite b), Integral (BackendKey b)) => Integral (BackendKey (RawSqlite b)) | |
Defined in Database.Persist.Sqlite Methods quot :: BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) rem :: BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) div :: BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) mod :: BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) quotRem :: BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) -> (BackendKey (RawSqlite b), BackendKey (RawSqlite b)) divMod :: BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) -> (BackendKey (RawSqlite b), BackendKey (RawSqlite b)) toInteger :: BackendKey (RawSqlite b) -> Integer | |
(BackendCompatible b s, Real (BackendKey b)) => Real (BackendKey (Compatible b s)) | |
Defined in Database.Persist.Compatible.Types Methods toRational :: BackendKey (Compatible b s) -> Rational | |
(PersistCore b, PersistCore (RawSqlite b), Real (BackendKey b)) => Real (BackendKey (RawSqlite b)) | |
Defined in Database.Persist.Sqlite Methods toRational :: BackendKey (RawSqlite b) -> Rational | |
(BackendCompatible b s, Show (BackendKey b)) => Show (BackendKey (Compatible b s)) | |
Defined in Database.Persist.Compatible.Types Methods showsPrec :: Int -> BackendKey (Compatible b s) -> ShowS show :: BackendKey (Compatible b s) -> String showList :: [BackendKey (Compatible b s)] -> ShowS | |
(PersistCore b, PersistCore (RawSqlite b), Show (BackendKey b)) => Show (BackendKey (RawSqlite b)) | |
Defined in Database.Persist.Sqlite Methods showsPrec :: Int -> BackendKey (RawSqlite b) -> ShowS show :: BackendKey (RawSqlite b) -> String showList :: [BackendKey (RawSqlite b)] -> ShowS | |
(BackendCompatible b s, Eq (BackendKey b)) => Eq (BackendKey (Compatible b s)) | |
Defined in Database.Persist.Compatible.Types Methods (==) :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> Bool (/=) :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> Bool | |
(PersistCore b, PersistCore (RawSqlite b), Eq (BackendKey b)) => Eq (BackendKey (RawSqlite b)) | |
Defined in Database.Persist.Sqlite Methods (==) :: BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) -> Bool (/=) :: BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) -> Bool | |
(BackendCompatible b s, Ord (BackendKey b)) => Ord (BackendKey (Compatible b s)) | |
Defined in Database.Persist.Compatible.Types Methods compare :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> Ordering (<) :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> Bool (<=) :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> Bool (>) :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> Bool (>=) :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> Bool max :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> BackendKey (Compatible b s) min :: BackendKey (Compatible b s) -> BackendKey (Compatible b s) -> BackendKey (Compatible b s) | |
(PersistCore b, PersistCore (RawSqlite b), Ord (BackendKey b)) => Ord (BackendKey (RawSqlite b)) | |
Defined in Database.Persist.Sqlite Methods compare :: BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) -> Ordering (<) :: BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) -> Bool (<=) :: BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) -> Bool (>) :: BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) -> Bool (>=) :: BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) -> Bool max :: BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) min :: BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) | |
(BackendCompatible b s, PersistField (BackendKey b)) => PersistField (BackendKey (Compatible b s)) | |
Defined in Database.Persist.Compatible.Types Methods toPersistValue :: BackendKey (Compatible b s) -> PersistValue # fromPersistValue :: PersistValue -> Either Text (BackendKey (Compatible b s)) # | |
(PersistCore b, PersistCore (RawSqlite b), PersistField (BackendKey b)) => PersistField (BackendKey (RawSqlite b)) Source # | |
Defined in Database.Persist.Sqlite Methods toPersistValue :: BackendKey (RawSqlite b) -> PersistValue # fromPersistValue :: PersistValue -> Either Text (BackendKey (RawSqlite b)) # | |
(BackendCompatible b s, PersistFieldSql (BackendKey b)) => PersistFieldSql (BackendKey (Compatible b s)) | |
Defined in Database.Persist.Compatible.Types Methods sqlType :: Proxy (BackendKey (Compatible b s)) -> SqlType # | |
(PersistCore b, PersistCore (RawSqlite b), PersistFieldSql (BackendKey b)) => PersistFieldSql (BackendKey (RawSqlite b)) Source # | |
Defined in Database.Persist.Sqlite Methods sqlType :: Proxy (BackendKey (RawSqlite b)) -> SqlType # | |
newtype BackendKey SqlReadBackend | |
Defined in Database.Persist.Sql.Orphan.PersistStore | |
newtype BackendKey SqlWriteBackend | |
Defined in Database.Persist.Sql.Orphan.PersistStore | |
newtype BackendKey SqlBackend | |
Defined in Database.Persist.Sql.Orphan.PersistStore | |
type Rep (BackendKey SqlReadBackend) | |
Defined in Database.Persist.Sql.Orphan.PersistStore type Rep (BackendKey SqlReadBackend) = D1 ('MetaData "BackendKey" "Database.Persist.Sql.Orphan.PersistStore" "persistent-2.14.6.3-4rUXkEyv9IqGc70msb2CM1" 'True) (C1 ('MetaCons "SqlReadBackendKey" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSqlReadBackendKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int64))) | |
type Rep (BackendKey SqlWriteBackend) | |
Defined in Database.Persist.Sql.Orphan.PersistStore type Rep (BackendKey SqlWriteBackend) = D1 ('MetaData "BackendKey" "Database.Persist.Sql.Orphan.PersistStore" "persistent-2.14.6.3-4rUXkEyv9IqGc70msb2CM1" 'True) (C1 ('MetaCons "SqlWriteBackendKey" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSqlWriteBackendKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int64))) | |
type Rep (BackendKey SqlBackend) | |
Defined in Database.Persist.Sql.Orphan.PersistStore type Rep (BackendKey SqlBackend) = D1 ('MetaData "BackendKey" "Database.Persist.Sql.Orphan.PersistStore" "persistent-2.14.6.3-4rUXkEyv9IqGc70msb2CM1" 'True) (C1 ('MetaCons "SqlBackendKey" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSqlBackendKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int64))) | |
newtype BackendKey (RawSqlite b) Source # | |
Defined in Database.Persist.Sqlite newtype BackendKey (RawSqlite b) = RawSqliteKey {
| |
newtype BackendKey (Compatible b s) | |
Defined in Database.Persist.Compatible.Types |
class HasPersistBackend backend where #
Associated Types
type BaseBackend backend #
Methods
persistBackend :: backend -> BaseBackend backend #
Instances
HasPersistBackend SqlReadBackend | |||||
Defined in Database.Persist.Sql.Types.Internal Associated Types
Methods persistBackend :: SqlReadBackend -> BaseBackend SqlReadBackend # | |||||
HasPersistBackend SqlWriteBackend | |||||
Defined in Database.Persist.Sql.Types.Internal Associated Types
Methods persistBackend :: SqlWriteBackend -> BaseBackend SqlWriteBackend # | |||||
HasPersistBackend SqlBackend | |||||
Defined in Database.Persist.SqlBackend.Internal Associated Types
Methods | |||||
HasPersistBackend b => HasPersistBackend (RawSqlite b) Source # | |||||
Defined in Database.Persist.Sqlite Associated Types
Methods persistBackend :: RawSqlite b -> BaseBackend (RawSqlite b) # | |||||
(BackendCompatible b s, HasPersistBackend b) => HasPersistBackend (Compatible b s) | |||||
Defined in Database.Persist.Compatible.Types Associated Types
Methods persistBackend :: Compatible b s -> BaseBackend (Compatible b s) # |
type family BaseBackend backend #
Instances
type BaseBackend SqlReadBackend | |
Defined in Database.Persist.Sql.Types.Internal | |
type BaseBackend SqlWriteBackend | |
Defined in Database.Persist.Sql.Types.Internal | |
type BaseBackend SqlBackend | |
Defined in Database.Persist.SqlBackend.Internal | |
type BaseBackend (RawSqlite b0) Source # | |
Defined in Database.Persist.Sqlite | |
type BaseBackend (Compatible b s) | |
Defined in Database.Persist.Compatible.Types |
class HasPersistBackend backend => IsPersistBackend backend #
Minimal complete definition
mkPersistBackend
Instances
IsPersistBackend SqlReadBackend | |
Defined in Database.Persist.Sql.Types.Internal Methods mkPersistBackend :: BaseBackend SqlReadBackend -> SqlReadBackend | |
IsPersistBackend SqlWriteBackend | |
Defined in Database.Persist.Sql.Types.Internal Methods mkPersistBackend :: BaseBackend SqlWriteBackend -> SqlWriteBackend | |
IsPersistBackend SqlBackend | |
Defined in Database.Persist.SqlBackend.Internal Methods |
type PersistRecordBackend record backend = (PersistEntity record, PersistEntityBackend record ~ BaseBackend backend) #
class (Show (BackendKey backend), Read (BackendKey backend), Eq (BackendKey backend), Ord (BackendKey backend), PersistCore backend, PersistField (BackendKey backend), ToJSON (BackendKey backend), FromJSON (BackendKey backend)) => PersistStoreRead backend where #
Minimal complete definition
Methods
get :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend) => Key record -> ReaderT backend m (Maybe record) #
getMany :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend) => [Key record] -> ReaderT backend m (Map (Key record) record) #
Instances
(HasPersistBackend b, PersistStoreRead b) => PersistStoreRead (RawSqlite b) Source # | |
Defined in Database.Persist.Sqlite Methods get :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b)) => Key record -> ReaderT (RawSqlite b) m (Maybe record) # getMany :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b)) => [Key record] -> ReaderT (RawSqlite b) m (Map (Key record) record) # | |
(HasPersistBackend b, BackendCompatible b s, PersistStoreRead b) => PersistStoreRead (Compatible b s) | |
Defined in Database.Persist.Compatible.Types Methods get :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (Compatible b s)) => Key record -> ReaderT (Compatible b s) m (Maybe record) # getMany :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (Compatible b s)) => [Key record] -> ReaderT (Compatible b s) m (Map (Key record) record) # |
class (PersistEntity record, PersistEntityBackend record ~ backend, PersistCore backend) => ToBackendKey backend record where #
Methods
toBackendKey :: Key record -> BackendKey backend #
fromBackendKey :: BackendKey backend -> Key record #
belongsTo :: forall ent1 ent2 backend (m :: Type -> Type). (PersistStoreRead backend, PersistEntity ent1, PersistRecordBackend ent2 backend, MonadIO m) => (ent1 -> Maybe (Key ent2)) -> ent1 -> ReaderT backend m (Maybe ent2) #
belongsToJust :: forall ent1 ent2 backend (m :: Type -> Type). (PersistStoreRead backend, PersistEntity ent1, PersistRecordBackend ent2 backend, MonadIO m) => (ent1 -> Key ent2) -> ent1 -> ReaderT backend m ent2 #
getEntity :: forall e backend (m :: Type -> Type). (PersistStoreRead backend, PersistRecordBackend e backend, MonadIO m) => Key e -> ReaderT backend m (Maybe (Entity e)) #
getJust :: forall record backend (m :: Type -> Type). (PersistStoreRead backend, PersistRecordBackend record backend, MonadIO m) => Key record -> ReaderT backend m record #
getJustEntity :: forall record backend (m :: Type -> Type). (PersistEntityBackend record ~ BaseBackend backend, MonadIO m, PersistEntity record, PersistStoreRead backend) => Key record -> ReaderT backend m (Entity record) #
insertEntity :: forall e backend (m :: Type -> Type). (PersistStoreWrite backend, PersistRecordBackend e backend, SafeToInsert e, MonadIO m, HasCallStack) => e -> ReaderT backend m (Entity e) #
insertRecord :: forall record backend (m :: Type -> Type). (PersistEntityBackend record ~ BaseBackend backend, PersistEntity record, MonadIO m, PersistStoreWrite backend, SafeToInsert record, HasCallStack) => record -> ReaderT backend m record #
liftPersist :: (MonadIO m, MonadReader backend m) => ReaderT backend IO b -> m b #
withBaseBackend :: forall backend (m :: Type -> Type) a. HasPersistBackend backend => ReaderT (BaseBackend backend) m a -> ReaderT backend m a #
withCompatibleBackend :: forall sup sub (m :: Type -> Type) a. BackendCompatible sup sub => ReaderT sup m a -> ReaderT sub m a #
class PersistEntity record => AtLeastOneUniqueKey record where #
Methods
requireUniquesP :: record -> NonEmpty (Unique record) #
type MultipleUniqueKeysError ty = ((('Text "The entity " ':<>: 'ShowType ty) ':<>: 'Text " has multiple unique keys.") ':$$: ('Text "The function you are trying to call requires only a single " ':<>: 'Text "unique key.")) ':$$: (('Text "There is probably a variant of the function with 'By' " ':<>: 'Text "appended that will allow you to select a unique key ") ':<>: 'Text "for the operation.") #
type NoUniqueKeysError ty = (('Text "The entity " ':<>: 'ShowType ty) ':<>: 'Text " does not have any unique keys.") ':$$: ('Text "The function you are trying to call requires a unique key " ':<>: 'Text "to be defined on the entity.") #
class PersistEntity record => OnlyOneUniqueKey record where #
Methods
onlyUniqueP :: record -> Unique record #
class PersistStoreRead backend => PersistUniqueRead backend where #
Minimal complete definition
Methods
getBy :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend) => Unique record -> ReaderT backend m (Maybe (Entity record)) #
existsBy :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend) => Unique record -> ReaderT backend m Bool #
Instances
(HasPersistBackend b, PersistUniqueRead b) => PersistUniqueRead (RawSqlite b) Source # | |
Defined in Database.Persist.Sqlite Methods getBy :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b)) => Unique record -> ReaderT (RawSqlite b) m (Maybe (Entity record)) # existsBy :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b)) => Unique record -> ReaderT (RawSqlite b) m Bool # | |
(HasPersistBackend b, BackendCompatible b s, PersistUniqueRead b) => PersistUniqueRead (Compatible b s) | |
Defined in Database.Persist.Compatible.Types Methods getBy :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (Compatible b s)) => Unique record -> ReaderT (Compatible b s) m (Maybe (Entity record)) # existsBy :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (Compatible b s)) => Unique record -> ReaderT (Compatible b s) m Bool # |
class (PersistUniqueRead backend, PersistStoreWrite backend) => PersistUniqueWrite backend where #
Minimal complete definition
Methods
deleteBy :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend) => Unique record -> ReaderT backend m () #
insertUnique :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend, SafeToInsert record) => record -> ReaderT backend m (Maybe (Key record)) #
insertUnique_ :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend, SafeToInsert record) => record -> ReaderT backend m (Maybe ()) #
upsert :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend, OnlyOneUniqueKey record, SafeToInsert record) => record -> [Update record] -> ReaderT backend m (Entity record) #
upsertBy :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend, SafeToInsert record) => Unique record -> record -> [Update record] -> ReaderT backend m (Entity record) #
putMany :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend, SafeToInsert record) => [record] -> ReaderT backend m () #
Instances
(HasPersistBackend b, PersistUniqueWrite b) => PersistUniqueWrite (RawSqlite b) Source # | |
Defined in Database.Persist.Sqlite Methods deleteBy :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b)) => Unique record -> ReaderT (RawSqlite b) m () # insertUnique :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b), SafeToInsert record) => record -> ReaderT (RawSqlite b) m (Maybe (Key record)) # insertUnique_ :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b), SafeToInsert record) => record -> ReaderT (RawSqlite b) m (Maybe ()) # upsert :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b), OnlyOneUniqueKey record, SafeToInsert record) => record -> [Update record] -> ReaderT (RawSqlite b) m (Entity record) # upsertBy :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b), SafeToInsert record) => Unique record -> record -> [Update record] -> ReaderT (RawSqlite b) m (Entity record) # putMany :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b), SafeToInsert record) => [record] -> ReaderT (RawSqlite b) m () # | |
(HasPersistBackend b, BackendCompatible b s, PersistUniqueWrite b) => PersistUniqueWrite (Compatible b s) | |
Defined in Database.Persist.Compatible.Types Methods deleteBy :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (Compatible b s)) => Unique record -> ReaderT (Compatible b s) m () # insertUnique :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (Compatible b s), SafeToInsert record) => record -> ReaderT (Compatible b s) m (Maybe (Key record)) # insertUnique_ :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (Compatible b s), SafeToInsert record) => record -> ReaderT (Compatible b s) m (Maybe ()) # upsert :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (Compatible b s), OnlyOneUniqueKey record, SafeToInsert record) => record -> [Update record] -> ReaderT (Compatible b s) m (Entity record) # upsertBy :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (Compatible b s), SafeToInsert record) => Unique record -> record -> [Update record] -> ReaderT (Compatible b s) m (Entity record) # putMany :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (Compatible b s), SafeToInsert record) => [record] -> ReaderT (Compatible b s) m () # |
checkUnique :: forall record backend (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend, PersistUniqueRead backend) => record -> ReaderT backend m (Maybe (Unique record)) #
checkUniqueUpdateable :: forall record backend (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend, PersistUniqueRead backend) => Entity record -> ReaderT backend m (Maybe (Unique record)) #
getByValue :: forall record (m :: Type -> Type) backend. (MonadIO m, PersistUniqueRead backend, PersistRecordBackend record backend, AtLeastOneUniqueKey record) => record -> ReaderT backend m (Maybe (Entity record)) #
insertBy :: forall record backend (m :: Type -> Type). (MonadIO m, PersistUniqueWrite backend, PersistRecordBackend record backend, AtLeastOneUniqueKey record, SafeToInsert record) => record -> ReaderT backend m (Either (Entity record) (Key record)) #
insertUniqueEntity :: forall record backend (m :: Type -> Type). (MonadIO m, PersistRecordBackend record backend, PersistUniqueWrite backend, SafeToInsert record) => record -> ReaderT backend m (Maybe (Entity record)) #
onlyOneUniqueDef :: (OnlyOneUniqueKey record, Monad proxy) => proxy record -> UniqueDef #
onlyUnique :: forall record backend (m :: Type -> Type). (MonadIO m, PersistUniqueWrite backend, PersistRecordBackend record backend, OnlyOneUniqueKey record) => record -> ReaderT backend m (Unique record) #
replaceUnique :: forall record backend (m :: Type -> Type). (MonadIO m, Eq (Unique record), PersistRecordBackend record backend, PersistUniqueWrite backend) => Key record -> record -> ReaderT backend m (Maybe (Unique record)) #
getEntityComments :: EntityDef -> Maybe Text #
getEntityExtra :: EntityDef -> Map Text [[Text]] #
getEntityFields :: EntityDef -> [FieldDef] #
getEntityFieldsDatabase :: EntityDef -> [FieldDef] #
getEntityForeignDefs :: EntityDef -> [ForeignDef] #
getEntityId :: EntityDef -> EntityIdDef #
getEntityIdField :: EntityDef -> Maybe FieldDef #
getEntityKeyFields :: EntityDef -> NonEmpty FieldDef #
getEntityUniques :: EntityDef -> [UniqueDef] #
isEntitySum :: EntityDef -> Bool #
setEntityDBName :: EntityNameDB -> EntityDef -> EntityDef #
setEntityId :: FieldDef -> EntityDef -> EntityDef #
setEntityIdDef :: EntityIdDef -> EntityDef -> EntityDef #
addFieldAttr :: FieldAttr -> FieldDef -> FieldDef #
isFieldMaybe :: FieldDef -> Bool #
isFieldNullable :: FieldDef -> IsNullable #
setFieldAttrs :: [FieldAttr] -> FieldDef -> FieldDef #
newtype ConstraintNameDB #
Constructors
ConstraintNameDB | |
Fields
|
Instances
Read ConstraintNameDB | |
Defined in Database.Persist.Names Methods readsPrec :: Int -> ReadS ConstraintNameDB readList :: ReadS [ConstraintNameDB] readPrec :: ReadPrec ConstraintNameDB readListPrec :: ReadPrec [ConstraintNameDB] | |
Show ConstraintNameDB | |
Defined in Database.Persist.Names Methods showsPrec :: Int -> ConstraintNameDB -> ShowS show :: ConstraintNameDB -> String showList :: [ConstraintNameDB] -> ShowS | |
Eq ConstraintNameDB | |
Defined in Database.Persist.Names Methods (==) :: ConstraintNameDB -> ConstraintNameDB -> Bool (/=) :: ConstraintNameDB -> ConstraintNameDB -> Bool | |
Ord ConstraintNameDB | |
Defined in Database.Persist.Names Methods compare :: ConstraintNameDB -> ConstraintNameDB -> Ordering (<) :: ConstraintNameDB -> ConstraintNameDB -> Bool (<=) :: ConstraintNameDB -> ConstraintNameDB -> Bool (>) :: ConstraintNameDB -> ConstraintNameDB -> Bool (>=) :: ConstraintNameDB -> ConstraintNameDB -> Bool max :: ConstraintNameDB -> ConstraintNameDB -> ConstraintNameDB min :: ConstraintNameDB -> ConstraintNameDB -> ConstraintNameDB | |
DatabaseName ConstraintNameDB | |
Defined in Database.Persist.Names Methods escapeWith :: (Text -> str) -> ConstraintNameDB -> str # | |
Lift ConstraintNameDB | |
Defined in Database.Persist.Names Methods lift :: Quote m => ConstraintNameDB -> m Exp liftTyped :: forall (m :: Type -> Type). Quote m => ConstraintNameDB -> Code m ConstraintNameDB |
newtype ConstraintNameHS #
Constructors
ConstraintNameHS | |
Fields
|
Instances
Read ConstraintNameHS | |
Defined in Database.Persist.Names Methods readsPrec :: Int -> ReadS ConstraintNameHS readList :: ReadS [ConstraintNameHS] readPrec :: ReadPrec ConstraintNameHS readListPrec :: ReadPrec [ConstraintNameHS] | |
Show ConstraintNameHS | |
Defined in Database.Persist.Names Methods showsPrec :: Int -> ConstraintNameHS -> ShowS show :: ConstraintNameHS -> String showList :: [ConstraintNameHS] -> ShowS | |
Eq ConstraintNameHS | |
Defined in Database.Persist.Names Methods (==) :: ConstraintNameHS -> ConstraintNameHS -> Bool (/=) :: ConstraintNameHS -> ConstraintNameHS -> Bool | |
Ord ConstraintNameHS | |
Defined in Database.Persist.Names Methods compare :: ConstraintNameHS -> ConstraintNameHS -> Ordering (<) :: ConstraintNameHS -> ConstraintNameHS -> Bool (<=) :: ConstraintNameHS -> ConstraintNameHS -> Bool (>) :: ConstraintNameHS -> ConstraintNameHS -> Bool (>=) :: ConstraintNameHS -> ConstraintNameHS -> Bool max :: ConstraintNameHS -> ConstraintNameHS -> ConstraintNameHS min :: ConstraintNameHS -> ConstraintNameHS -> ConstraintNameHS | |
Lift ConstraintNameHS | |
Defined in Database.Persist.Names Methods lift :: Quote m => ConstraintNameHS -> m Exp liftTyped :: forall (m :: Type -> Type). Quote m => ConstraintNameHS -> Code m ConstraintNameHS |
class DatabaseName a where #
Methods
escapeWith :: (Text -> str) -> a -> str #
Instances
DatabaseName ConstraintNameDB | |
Defined in Database.Persist.Names Methods escapeWith :: (Text -> str) -> ConstraintNameDB -> str # | |
DatabaseName EntityNameDB | |
Defined in Database.Persist.Names Methods escapeWith :: (Text -> str) -> EntityNameDB -> str # | |
DatabaseName FieldNameDB | |
Defined in Database.Persist.Names Methods escapeWith :: (Text -> str) -> FieldNameDB -> str # |
newtype EntityNameDB #
Constructors
EntityNameDB | |
Fields
|
Instances
Read EntityNameDB | |
Defined in Database.Persist.Names Methods readsPrec :: Int -> ReadS EntityNameDB readList :: ReadS [EntityNameDB] readPrec :: ReadPrec EntityNameDB readListPrec :: ReadPrec [EntityNameDB] | |
Show EntityNameDB | |
Defined in Database.Persist.Names Methods showsPrec :: Int -> EntityNameDB -> ShowS show :: EntityNameDB -> String showList :: [EntityNameDB] -> ShowS | |
Eq EntityNameDB | |
Defined in Database.Persist.Names | |
Ord EntityNameDB | |
Defined in Database.Persist.Names Methods compare :: EntityNameDB -> EntityNameDB -> Ordering (<) :: EntityNameDB -> EntityNameDB -> Bool (<=) :: EntityNameDB -> EntityNameDB -> Bool (>) :: EntityNameDB -> EntityNameDB -> Bool (>=) :: EntityNameDB -> EntityNameDB -> Bool max :: EntityNameDB -> EntityNameDB -> EntityNameDB min :: EntityNameDB -> EntityNameDB -> EntityNameDB | |
DatabaseName EntityNameDB | |
Defined in Database.Persist.Names Methods escapeWith :: (Text -> str) -> EntityNameDB -> str # | |
Lift EntityNameDB | |
Defined in Database.Persist.Names Methods lift :: Quote m => EntityNameDB -> m Exp liftTyped :: forall (m :: Type -> Type). Quote m => EntityNameDB -> Code m EntityNameDB |
newtype EntityNameHS #
Constructors
EntityNameHS | |
Fields
|
Instances
Read EntityNameHS | |
Defined in Database.Persist.Names Methods readsPrec :: Int -> ReadS EntityNameHS readList :: ReadS [EntityNameHS] readPrec :: ReadPrec EntityNameHS readListPrec :: ReadPrec [EntityNameHS] | |
Show EntityNameHS | |
Defined in Database.Persist.Names Methods showsPrec :: Int -> EntityNameHS -> ShowS show :: EntityNameHS -> String showList :: [EntityNameHS] -> ShowS | |
Eq EntityNameHS | |
Defined in Database.Persist.Names | |
Ord EntityNameHS | |
Defined in Database.Persist.Names Methods compare :: EntityNameHS -> EntityNameHS -> Ordering (<) :: EntityNameHS -> EntityNameHS -> Bool (<=) :: EntityNameHS -> EntityNameHS -> Bool (>) :: EntityNameHS -> EntityNameHS -> Bool (>=) :: EntityNameHS -> EntityNameHS -> Bool max :: EntityNameHS -> EntityNameHS -> EntityNameHS min :: EntityNameHS -> EntityNameHS -> EntityNameHS | |
Lift EntityNameHS | |
Defined in Database.Persist.Names Methods lift :: Quote m => EntityNameHS -> m Exp liftTyped :: forall (m :: Type -> Type). Quote m => EntityNameHS -> Code m EntityNameHS |
newtype FieldNameDB #
Constructors
FieldNameDB | |
Fields
|
Instances
Read FieldNameDB | |
Defined in Database.Persist.Names Methods readsPrec :: Int -> ReadS FieldNameDB readList :: ReadS [FieldNameDB] readPrec :: ReadPrec FieldNameDB readListPrec :: ReadPrec [FieldNameDB] | |
Show FieldNameDB | |
Defined in Database.Persist.Names Methods showsPrec :: Int -> FieldNameDB -> ShowS show :: FieldNameDB -> String showList :: [FieldNameDB] -> ShowS | |
Eq FieldNameDB | |
Defined in Database.Persist.Names | |
Ord FieldNameDB | |
Defined in Database.Persist.Names Methods compare :: FieldNameDB -> FieldNameDB -> Ordering (<) :: FieldNameDB -> FieldNameDB -> Bool (<=) :: FieldNameDB -> FieldNameDB -> Bool (>) :: FieldNameDB -> FieldNameDB -> Bool (>=) :: FieldNameDB -> FieldNameDB -> Bool max :: FieldNameDB -> FieldNameDB -> FieldNameDB min :: FieldNameDB -> FieldNameDB -> FieldNameDB | |
DatabaseName FieldNameDB | |
Defined in Database.Persist.Names Methods escapeWith :: (Text -> str) -> FieldNameDB -> str # | |
Lift FieldNameDB | |
Defined in Database.Persist.Names Methods lift :: Quote m => FieldNameDB -> m Exp liftTyped :: forall (m :: Type -> Type). Quote m => FieldNameDB -> Code m FieldNameDB |
newtype FieldNameHS #
Constructors
FieldNameHS | |
Fields
|
Instances
Read FieldNameHS | |
Defined in Database.Persist.Names Methods readsPrec :: Int -> ReadS FieldNameHS readList :: ReadS [FieldNameHS] readPrec :: ReadPrec FieldNameHS readListPrec :: ReadPrec [FieldNameHS] | |
Show FieldNameHS | |
Defined in Database.Persist.Names Methods showsPrec :: Int -> FieldNameHS -> ShowS show :: FieldNameHS -> String showList :: [FieldNameHS] -> ShowS | |
Eq FieldNameHS | |
Defined in Database.Persist.Names | |
Ord FieldNameHS | |
Defined in Database.Persist.Names Methods compare :: FieldNameHS -> FieldNameHS -> Ordering (<) :: FieldNameHS -> FieldNameHS -> Bool (<=) :: FieldNameHS -> FieldNameHS -> Bool (>) :: FieldNameHS -> FieldNameHS -> Bool (>=) :: FieldNameHS -> FieldNameHS -> Bool max :: FieldNameHS -> FieldNameHS -> FieldNameHS min :: FieldNameHS -> FieldNameHS -> FieldNameHS | |
Lift FieldNameHS | |
Defined in Database.Persist.Names Methods lift :: Quote m => FieldNameHS -> m Exp liftTyped :: forall (m :: Type -> Type). Quote m => FieldNameHS -> Code m FieldNameHS |
fromPersistValueText :: PersistValue -> Either Text Text #
Instances
Bounded Checkmark | |
Defined in Database.Persist.Types.Base | |
Enum Checkmark | |
Defined in Database.Persist.Types.Base | |
Read Checkmark | |
Defined in Database.Persist.Types.Base | |
Show Checkmark | |
Eq Checkmark | |
Ord Checkmark | |
Defined in Database.Persist.Types.Base | |
FromHttpApiData Checkmark | |
Defined in Database.Persist.Types.Base Methods parseUrlPiece :: Text -> Either Text Checkmark parseHeader :: ByteString -> Either Text Checkmark parseQueryParam :: Text -> Either Text Checkmark | |
ToHttpApiData Checkmark | |
Defined in Database.Persist.Types.Base Methods toUrlPiece :: Checkmark -> Text toEncodedUrlPiece :: Checkmark -> Builder toHeader :: Checkmark -> ByteString toQueryParam :: Checkmark -> Text toEncodedQueryParam :: Checkmark -> Builder | |
PathPiece Checkmark | |
Defined in Database.Persist.Types.Base | |
PersistField Checkmark | |
Defined in Database.Persist.Class.PersistField Methods toPersistValue :: Checkmark -> PersistValue # fromPersistValue :: PersistValue -> Either Text Checkmark # | |
PersistFieldSql Checkmark | |
Defined in Database.Persist.Sql.Class |
data WhyNullable #
Constructors
ByMaybeAttr | |
ByNullableAttr |
Instances
Show WhyNullable | |
Defined in Database.Persist.Types.Base Methods showsPrec :: Int -> WhyNullable -> ShowS show :: WhyNullable -> String showList :: [WhyNullable] -> ShowS | |
Eq WhyNullable | |
Defined in Database.Persist.Types.Base |
data CascadeAction #
Constructors
Cascade | |
Restrict | |
SetNull | |
SetDefault |
Instances
Read CascadeAction | |
Defined in Database.Persist.Types.Base Methods readsPrec :: Int -> ReadS CascadeAction readList :: ReadS [CascadeAction] readPrec :: ReadPrec CascadeAction readListPrec :: ReadPrec [CascadeAction] | |
Show CascadeAction | |
Defined in Database.Persist.Types.Base Methods showsPrec :: Int -> CascadeAction -> ShowS show :: CascadeAction -> String showList :: [CascadeAction] -> ShowS | |
Eq CascadeAction | |
Defined in Database.Persist.Types.Base | |
Ord CascadeAction | |
Defined in Database.Persist.Types.Base Methods compare :: CascadeAction -> CascadeAction -> Ordering (<) :: CascadeAction -> CascadeAction -> Bool (<=) :: CascadeAction -> CascadeAction -> Bool (>) :: CascadeAction -> CascadeAction -> Bool (>=) :: CascadeAction -> CascadeAction -> Bool max :: CascadeAction -> CascadeAction -> CascadeAction min :: CascadeAction -> CascadeAction -> CascadeAction | |
Lift CascadeAction | |
Defined in Database.Persist.Types.Base Methods lift :: Quote m => CascadeAction -> m Exp liftTyped :: forall (m :: Type -> Type). Quote m => CascadeAction -> Code m CascadeAction |
data CompositeDef #
Constructors
CompositeDef | |
Fields
|
Instances
Read CompositeDef | |
Defined in Database.Persist.Types.Base Methods readsPrec :: Int -> ReadS CompositeDef readList :: ReadS [CompositeDef] readPrec :: ReadPrec CompositeDef readListPrec :: ReadPrec [CompositeDef] | |
Show CompositeDef | |
Defined in Database.Persist.Types.Base Methods showsPrec :: Int -> CompositeDef -> ShowS show :: CompositeDef -> String showList :: [CompositeDef] -> ShowS | |
Eq CompositeDef | |
Defined in Database.Persist.Types.Base | |
Ord CompositeDef | |
Defined in Database.Persist.Types.Base Methods compare :: CompositeDef -> CompositeDef -> Ordering (<) :: CompositeDef -> CompositeDef -> Bool (<=) :: CompositeDef -> CompositeDef -> Bool (>) :: CompositeDef -> CompositeDef -> Bool (>=) :: CompositeDef -> CompositeDef -> Bool max :: CompositeDef -> CompositeDef -> CompositeDef min :: CompositeDef -> CompositeDef -> CompositeDef | |
Lift CompositeDef | |
Defined in Database.Persist.Types.Base Methods lift :: Quote m => CompositeDef -> m Exp liftTyped :: forall (m :: Type -> Type). Quote m => CompositeDef -> Code m CompositeDef |
data EmbedEntityDef #
Constructors
EmbedEntityDef | |
Fields |
Instances
Read EmbedEntityDef | |
Defined in Database.Persist.Types.Base Methods readsPrec :: Int -> ReadS EmbedEntityDef readList :: ReadS [EmbedEntityDef] readPrec :: ReadPrec EmbedEntityDef readListPrec :: ReadPrec [EmbedEntityDef] | |
Show EmbedEntityDef | |
Defined in Database.Persist.Types.Base Methods showsPrec :: Int -> EmbedEntityDef -> ShowS show :: EmbedEntityDef -> String showList :: [EmbedEntityDef] -> ShowS | |
Eq EmbedEntityDef | |
Defined in Database.Persist.Types.Base Methods (==) :: EmbedEntityDef -> EmbedEntityDef -> Bool (/=) :: EmbedEntityDef -> EmbedEntityDef -> Bool | |
Ord EmbedEntityDef | |
Defined in Database.Persist.Types.Base Methods compare :: EmbedEntityDef -> EmbedEntityDef -> Ordering (<) :: EmbedEntityDef -> EmbedEntityDef -> Bool (<=) :: EmbedEntityDef -> EmbedEntityDef -> Bool (>) :: EmbedEntityDef -> EmbedEntityDef -> Bool (>=) :: EmbedEntityDef -> EmbedEntityDef -> Bool max :: EmbedEntityDef -> EmbedEntityDef -> EmbedEntityDef min :: EmbedEntityDef -> EmbedEntityDef -> EmbedEntityDef | |
Lift EmbedEntityDef | |
Defined in Database.Persist.Types.Base Methods lift :: Quote m => EmbedEntityDef -> m Exp liftTyped :: forall (m :: Type -> Type). Quote m => EmbedEntityDef -> Code m EmbedEntityDef |
data EmbedFieldDef #
Constructors
EmbedFieldDef | |
Fields
|
Instances
Read EmbedFieldDef | |
Defined in Database.Persist.Types.Base Methods readsPrec :: Int -> ReadS EmbedFieldDef readList :: ReadS [EmbedFieldDef] readPrec :: ReadPrec EmbedFieldDef readListPrec :: ReadPrec [EmbedFieldDef] | |
Show EmbedFieldDef | |
Defined in Database.Persist.Types.Base Methods showsPrec :: Int -> EmbedFieldDef -> ShowS show :: EmbedFieldDef -> String showList :: [EmbedFieldDef] -> ShowS | |
Eq EmbedFieldDef | |
Defined in Database.Persist.Types.Base | |
Ord EmbedFieldDef | |
Defined in Database.Persist.Types.Base Methods compare :: EmbedFieldDef -> EmbedFieldDef -> Ordering (<) :: EmbedFieldDef -> EmbedFieldDef -> Bool (<=) :: EmbedFieldDef -> EmbedFieldDef -> Bool (>) :: EmbedFieldDef -> EmbedFieldDef -> Bool (>=) :: EmbedFieldDef -> EmbedFieldDef -> Bool max :: EmbedFieldDef -> EmbedFieldDef -> EmbedFieldDef min :: EmbedFieldDef -> EmbedFieldDef -> EmbedFieldDef | |
Lift EmbedFieldDef | |
Defined in Database.Persist.Types.Base Methods lift :: Quote m => EmbedFieldDef -> m Exp liftTyped :: forall (m :: Type -> Type). Quote m => EmbedFieldDef -> Code m EmbedFieldDef |
data ReferenceDef #
Constructors
NoReference | |
ForeignRef !EntityNameHS | |
EmbedRef EntityNameHS | |
SelfReference |
Instances
Read ReferenceDef | |
Defined in Database.Persist.Types.Base Methods readsPrec :: Int -> ReadS ReferenceDef readList :: ReadS [ReferenceDef] readPrec :: ReadPrec ReferenceDef readListPrec :: ReadPrec [ReferenceDef] | |
Show ReferenceDef | |
Defined in Database.Persist.Types.Base Methods showsPrec :: Int -> ReferenceDef -> ShowS show :: ReferenceDef -> String showList :: [ReferenceDef] -> ShowS | |
Eq ReferenceDef | |
Defined in Database.Persist.Types.Base | |
Ord ReferenceDef | |
Defined in Database.Persist.Types.Base Methods compare :: ReferenceDef -> ReferenceDef -> Ordering (<) :: ReferenceDef -> ReferenceDef -> Bool (<=) :: ReferenceDef -> ReferenceDef -> Bool (>) :: ReferenceDef -> ReferenceDef -> Bool (>=) :: ReferenceDef -> ReferenceDef -> Bool max :: ReferenceDef -> ReferenceDef -> ReferenceDef min :: ReferenceDef -> ReferenceDef -> ReferenceDef | |
Lift ReferenceDef | |
Defined in Database.Persist.Types.Base Methods lift :: Quote m => ReferenceDef -> m Exp liftTyped :: forall (m :: Type -> Type). Quote m => ReferenceDef -> Code m ReferenceDef |
Instances
Read EntityDef | |
Defined in Database.Persist.Types.Base | |
Show EntityDef | |
Eq EntityDef | |
Ord EntityDef | |
Defined in Database.Persist.Types.Base | |
Lift EntityDef | |
data EntityIdDef #
Constructors
EntityIdField !FieldDef | |
EntityIdNaturalKey !CompositeDef |
Instances
Read EntityIdDef | |
Defined in Database.Persist.Types.Base Methods readsPrec :: Int -> ReadS EntityIdDef readList :: ReadS [EntityIdDef] readPrec :: ReadPrec EntityIdDef readListPrec :: ReadPrec [EntityIdDef] | |
Show EntityIdDef | |
Defined in Database.Persist.Types.Base Methods showsPrec :: Int -> EntityIdDef -> ShowS show :: EntityIdDef -> String showList :: [EntityIdDef] -> ShowS | |
Eq EntityIdDef | |
Defined in Database.Persist.Types.Base | |
Ord EntityIdDef | |
Defined in Database.Persist.Types.Base Methods compare :: EntityIdDef -> EntityIdDef -> Ordering (<) :: EntityIdDef -> EntityIdDef -> Bool (<=) :: EntityIdDef -> EntityIdDef -> Bool (>) :: EntityIdDef -> EntityIdDef -> Bool (>=) :: EntityIdDef -> EntityIdDef -> Bool max :: EntityIdDef -> EntityIdDef -> EntityIdDef min :: EntityIdDef -> EntityIdDef -> EntityIdDef | |
Lift EntityIdDef | |
Defined in Database.Persist.Types.Base Methods lift :: Quote m => EntityIdDef -> m Exp liftTyped :: forall (m :: Type -> Type). Quote m => EntityIdDef -> Code m EntityIdDef |
Constructors
FTTypeCon (Maybe Text) Text | |
FTLit FieldTypeLit | |
FTTypePromoted Text | |
FTApp FieldType FieldType | |
FTList FieldType |
Instances
Read FieldType | |
Defined in Database.Persist.Types.Base | |
Show FieldType | |
Eq FieldType | |
Ord FieldType | |
Defined in Database.Persist.Types.Base | |
Lift FieldType | |
Constructors
FieldAttrMaybe | |
FieldAttrNullable | |
FieldAttrMigrationOnly | |
FieldAttrSafeToRemove | |
FieldAttrNoreference | |
FieldAttrReference Text | |
FieldAttrConstraint Text | |
FieldAttrDefault Text | |
FieldAttrSqltype Text | |
FieldAttrMaxlen Integer | |
FieldAttrSql Text | |
FieldAttrOther Text |
Instances
Read FieldAttr | |
Defined in Database.Persist.Types.Base | |
Show FieldAttr | |
Eq FieldAttr | |
Ord FieldAttr | |
Defined in Database.Persist.Types.Base | |
Lift FieldAttr | |
data FieldCascade #
Constructors
FieldCascade | |
Fields
|
Instances
Read FieldCascade | |
Defined in Database.Persist.Types.Base Methods readsPrec :: Int -> ReadS FieldCascade readList :: ReadS [FieldCascade] readPrec :: ReadPrec FieldCascade readListPrec :: ReadPrec [FieldCascade] | |
Show FieldCascade | |
Defined in Database.Persist.Types.Base Methods showsPrec :: Int -> FieldCascade -> ShowS show :: FieldCascade -> String showList :: [FieldCascade] -> ShowS | |
Eq FieldCascade | |
Defined in Database.Persist.Types.Base | |
Ord FieldCascade | |
Defined in Database.Persist.Types.Base Methods compare :: FieldCascade -> FieldCascade -> Ordering (<) :: FieldCascade -> FieldCascade -> Bool (<=) :: FieldCascade -> FieldCascade -> Bool (>) :: FieldCascade -> FieldCascade -> Bool (>=) :: FieldCascade -> FieldCascade -> Bool max :: FieldCascade -> FieldCascade -> FieldCascade min :: FieldCascade -> FieldCascade -> FieldCascade | |
Lift FieldCascade | |
Defined in Database.Persist.Types.Base Methods lift :: Quote m => FieldCascade -> m Exp liftTyped :: forall (m :: Type -> Type). Quote m => FieldCascade -> Code m FieldCascade |
Constructors
FieldDef | |
Fields
|
Instances
Read FieldDef | |
Defined in Database.Persist.Types.Base | |
Show FieldDef | |
Eq FieldDef | |
Ord FieldDef | |
Defined in Database.Persist.Types.Base | |
Lift FieldDef | |
data ForeignDef #
Constructors
ForeignDef | |
Fields
|
Instances
Read ForeignDef | |
Defined in Database.Persist.Types.Base Methods readsPrec :: Int -> ReadS ForeignDef readList :: ReadS [ForeignDef] readPrec :: ReadPrec ForeignDef readListPrec :: ReadPrec [ForeignDef] | |
Show ForeignDef | |
Defined in Database.Persist.Types.Base Methods showsPrec :: Int -> ForeignDef -> ShowS show :: ForeignDef -> String showList :: [ForeignDef] -> ShowS | |
Eq ForeignDef | |
Defined in Database.Persist.Types.Base | |
Ord ForeignDef | |
Defined in Database.Persist.Types.Base Methods compare :: ForeignDef -> ForeignDef -> Ordering (<) :: ForeignDef -> ForeignDef -> Bool (<=) :: ForeignDef -> ForeignDef -> Bool (>) :: ForeignDef -> ForeignDef -> Bool (>=) :: ForeignDef -> ForeignDef -> Bool max :: ForeignDef -> ForeignDef -> ForeignDef min :: ForeignDef -> ForeignDef -> ForeignDef | |
Lift ForeignDef | |
Defined in Database.Persist.Types.Base Methods lift :: Quote m => ForeignDef -> m Exp liftTyped :: forall (m :: Type -> Type). Quote m => ForeignDef -> Code m ForeignDef |
type ForeignFieldDef = (FieldNameHS, FieldNameDB) #
data IsNullable #
Constructors
Nullable !WhyNullable | |
NotNullable |
Instances
Show IsNullable | |
Defined in Database.Persist.Types.Base Methods showsPrec :: Int -> IsNullable -> ShowS show :: IsNullable -> String showList :: [IsNullable] -> ShowS | |
Eq IsNullable | |
Defined in Database.Persist.Types.Base |
data UpdateException #
Constructors
KeyNotFound String | |
UpsertError String |
Instances
Exception UpdateException | |
Defined in Database.Persist.Types.Base Methods toException :: UpdateException -> SomeException fromException :: SomeException -> Maybe UpdateException displayException :: UpdateException -> String | |
Show UpdateException | |
Defined in Database.Persist.Types.Base Methods showsPrec :: Int -> UpdateException -> ShowS show :: UpdateException -> String showList :: [UpdateException] -> ShowS |
data PersistException #
Constructors
PersistError Text | |
PersistMarshalError Text | |
PersistInvalidField Text | |
PersistForeignConstraintUnmet Text | |
PersistMongoDBError Text | |
PersistMongoDBUnsupported Text |
Instances
Exception PersistException | |
Defined in Database.Persist.Types.Base Methods toException :: PersistException -> SomeException fromException :: SomeException -> Maybe PersistException displayException :: PersistException -> String | |
Show PersistException | |
Defined in Database.Persist.Types.Base Methods showsPrec :: Int -> PersistException -> ShowS show :: PersistException -> String showList :: [PersistException] -> ShowS |
Constructors
SqlString | |
SqlInt32 | |
SqlInt64 | |
SqlReal | |
SqlNumeric Word32 Word32 | |
SqlBool | |
SqlDay | |
SqlTime | |
SqlDayTime | |
SqlBlob | |
SqlOther Text |
Constructors
UniqueDef | |
Fields
|
Instances
Read UniqueDef | |
Defined in Database.Persist.Types.Base | |
Show UniqueDef | |
Eq UniqueDef | |
Ord UniqueDef | |
Defined in Database.Persist.Types.Base | |
Lift UniqueDef | |
entitiesPrimary :: EntityDef -> NonEmpty FieldDef #
entityPrimary :: EntityDef -> Maybe CompositeDef #
isFieldNotGenerated :: FieldDef -> Bool #
isHaskellField :: FieldDef -> Bool #
keyAndEntityFields :: EntityDef -> NonEmpty FieldDef #
parseFieldAttrs :: [Text] -> [FieldAttr] #
renderCascadeAction :: CascadeAction -> Text #
renderFieldCascade :: FieldCascade -> Text #
(!=.) :: forall v typ. PersistField typ => EntityField v typ -> typ -> Filter v #
(*=.) :: forall v typ. PersistField typ => EntityField v typ -> typ -> Update v #
(+=.) :: forall v typ. PersistField typ => EntityField v typ -> typ -> Update v #
(-=.) :: forall v typ. PersistField typ => EntityField v typ -> typ -> Update v #
(/<-.) :: forall v typ. PersistField typ => EntityField v typ -> [typ] -> Filter v #
(/=.) :: forall v typ. PersistField typ => EntityField v typ -> typ -> Update v #
(<-.) :: forall v typ. PersistField typ => EntityField v typ -> [typ] -> Filter v #
(<.) :: forall v typ. PersistField typ => EntityField v typ -> typ -> Filter v #
(<=.) :: forall v typ. PersistField typ => EntityField v typ -> typ -> Filter v #
(=.) :: forall v typ. PersistField typ => EntityField v typ -> typ -> Update v #
(==.) :: forall v typ. PersistField typ => EntityField v typ -> typ -> Filter v #
(>.) :: forall v typ. PersistField typ => EntityField v typ -> typ -> Filter v #
(>=.) :: forall v typ. PersistField typ => EntityField v typ -> typ -> Filter v #
toJsonText :: ToJSON j => j -> Text #
limitOffsetOrder :: PersistEntity val => [SelectOpt val] -> (Int, Int, [SelectOpt val]) #
createSqlPool :: forall backend m. (MonadLoggerIO m, MonadUnliftIO m, BackendCompatible SqlBackend backend) => (LogFunc -> IO backend) -> Int -> m (Pool backend) #
data ConnectionPoolConfig #
Constructors
ConnectionPoolConfig | |
Fields
|
Instances
Show ConnectionPoolConfig | |
Defined in Database.Persist.Sql.Types Methods showsPrec :: Int -> ConnectionPoolConfig -> ShowS show :: ConnectionPoolConfig -> String showList :: [ConnectionPoolConfig] -> ShowS |
createSqlPoolWithConfig :: (MonadLoggerIO m, MonadUnliftIO m, BackendCompatible SqlBackend backend) => (LogFunc -> IO backend) -> ConnectionPoolConfig -> m (Pool backend) #
withSqlPool :: forall backend m a. (MonadLoggerIO m, MonadUnliftIO m, BackendCompatible SqlBackend backend) => (LogFunc -> IO backend) -> Int -> (Pool backend -> m a) -> m a #
withSqlConn :: forall backend m a. (MonadUnliftIO m, MonadLoggerIO m, BackendCompatible SqlBackend backend) => (LogFunc -> IO backend) -> (backend -> m a) -> m a #
rawExecute :: forall (m :: Type -> Type) backend. (MonadIO m, BackendCompatible SqlBackend backend) => Text -> [PersistValue] -> ReaderT backend m () #
decorateSQLWithLimitOffset :: Text -> (Int, Int) -> Text -> Text #
runSqlConn :: forall backend m a. (MonadUnliftIO m, BackendCompatible SqlBackend backend) => ReaderT backend m a -> backend -> m a #
data InsertSqlResult #
Constructors
ISRSingle Text | |
ISRInsertGet Text Text | |
ISRManyKeys Text [PersistValue] |
Constructors
Column | |
Fields
|
mkColumns :: [EntityDef] -> EntityDef -> BackendSpecificOverrides -> ([Column], [UniqueDef], [ForeignDef]) #
type CautiousMigration = [(Bool, Sql)] #
type Migration = WriterT [Text] (WriterT CautiousMigration (ReaderT SqlBackend IO)) () #
defaultAttribute :: [FieldAttr] -> Maybe Text #
data ColumnReference #
Constructors
ColumnReference | |
Fields |
Instances
Show ColumnReference | |
Defined in Database.Persist.Sql.Types Methods showsPrec :: Int -> ColumnReference -> ShowS show :: ColumnReference -> String showList :: [ColumnReference] -> ShowS | |
Eq ColumnReference | |
Defined in Database.Persist.Sql.Types Methods (==) :: ColumnReference -> ColumnReference -> Bool (/=) :: ColumnReference -> ColumnReference -> Bool | |
Ord ColumnReference | |
Defined in Database.Persist.Sql.Types Methods compare :: ColumnReference -> ColumnReference -> Ordering (<) :: ColumnReference -> ColumnReference -> Bool (<=) :: ColumnReference -> ColumnReference -> Bool (>) :: ColumnReference -> ColumnReference -> Bool (>=) :: ColumnReference -> ColumnReference -> Bool max :: ColumnReference -> ColumnReference -> ColumnReference min :: ColumnReference -> ColumnReference -> ColumnReference |
type SqlPersistT = ReaderT SqlBackend #
type ConnectionPool = Pool SqlBackend #
runSqlPool :: forall backend m a. (MonadUnliftIO m, BackendCompatible SqlBackend backend) => ReaderT backend m a -> Pool backend -> m a #
rawQuery :: forall (m :: Type -> Type) env. (MonadResource m, MonadReader env m, BackendCompatible SqlBackend env) => Text -> [PersistValue] -> ConduitM () [PersistValue] m () #
close' :: BackendCompatible SqlBackend backend => backend -> IO () #
reportError :: Text -> Migration #
newtype EntityWithPrefix (prefix :: Symbol) record #
Constructors
EntityWithPrefix | |
Fields
|
Instances
(PersistEntity record, KnownSymbol prefix, PersistEntityBackend record ~ backend, IsPersistBackend backend) => RawSql (EntityWithPrefix prefix record) | |
Defined in Database.Persist.Sql.Class Methods rawSqlCols :: (Text -> Text) -> EntityWithPrefix prefix record -> (Int, [Text]) # rawSqlColCountReason :: EntityWithPrefix prefix record -> String # rawSqlProcessRow :: [PersistValue] -> Either Text (EntityWithPrefix prefix record) # |
class PersistField a => PersistFieldSql a where #
Instances
PersistFieldSql Int16 | |
Defined in Database.Persist.Sql.Class | |
PersistFieldSql Int32 | |
Defined in Database.Persist.Sql.Class | |
PersistFieldSql Int64 | |
Defined in Database.Persist.Sql.Class | |
PersistFieldSql Int8 | |
Defined in Database.Persist.Sql.Class | |
PersistFieldSql Rational | |
Defined in Database.Persist.Sql.Class | |
PersistFieldSql Word16 | |
Defined in Database.Persist.Sql.Class | |
PersistFieldSql Word32 | |
Defined in Database.Persist.Sql.Class | |
PersistFieldSql Word64 | |
Defined in Database.Persist.Sql.Class | |
PersistFieldSql Word8 | |
Defined in Database.Persist.Sql.Class | |
PersistFieldSql Html | |
Defined in Database.Persist.Sql.Class | |
PersistFieldSql ByteString | |
Defined in Database.Persist.Sql.Class | |
PersistFieldSql OverflowNatural | |
Defined in Database.Persist.Sql.Class Methods sqlType :: Proxy OverflowNatural -> SqlType # | |
PersistFieldSql PersistValue | |
Defined in Database.Persist.Sql.Class Methods sqlType :: Proxy PersistValue -> SqlType # | |
PersistFieldSql Checkmark | |
Defined in Database.Persist.Sql.Class | |
PersistFieldSql Text | |
Defined in Database.Persist.Sql.Class | |
PersistFieldSql Text | |
Defined in Database.Persist.Sql.Class | |
PersistFieldSql Day | |
Defined in Database.Persist.Sql.Class | |
PersistFieldSql UTCTime | |
Defined in Database.Persist.Sql.Class | |
PersistFieldSql TimeOfDay | |
Defined in Database.Persist.Sql.Class | |
PersistFieldSql Bool | |
Defined in Database.Persist.Sql.Class | |
PersistFieldSql Double | |
Defined in Database.Persist.Sql.Class | |
PersistFieldSql Int | |
Defined in Database.Persist.Sql.Class | |
PersistFieldSql Word | |
Defined in Database.Persist.Sql.Class | |
PersistFieldSql v => PersistFieldSql (IntMap v) | |
Defined in Database.Persist.Sql.Class | |
(Ord a, PersistFieldSql a) => PersistFieldSql (Set a) | |
Defined in Database.Persist.Sql.Class | |
(PersistField record, PersistEntity record) => PersistFieldSql (Entity record) | |
Defined in Database.Persist.Sql.Class | |
(BackendCompatible b s, PersistFieldSql (BackendKey b)) => PersistFieldSql (BackendKey (Compatible b s)) | |
Defined in Database.Persist.Compatible.Types Methods sqlType :: Proxy (BackendKey (Compatible b s)) -> SqlType # | |
(PersistCore b, PersistCore (RawSqlite b), PersistFieldSql (BackendKey b)) => PersistFieldSql (BackendKey (RawSqlite b)) Source # | |
Defined in Database.Persist.Sqlite Methods sqlType :: Proxy (BackendKey (RawSqlite b)) -> SqlType # | |
PersistFieldSql a => PersistFieldSql (Vector a) | |
Defined in Database.Persist.Sql.Class | |
PersistFieldSql a => PersistFieldSql (Maybe a) | |
Defined in Database.Persist.Sql.Class | |
PersistFieldSql [Char] | |
Defined in Database.Persist.Sql.Class | |
PersistFieldSql a => PersistFieldSql [a] | |
Defined in Database.Persist.Sql.Class | |
HasResolution a => PersistFieldSql (Fixed a) | |
Defined in Database.Persist.Sql.Class | |
PersistFieldSql v => PersistFieldSql (Map Text v) | |
Defined in Database.Persist.Sql.Class | |
(PersistFieldSql a, PersistFieldSql b) => PersistFieldSql (a, b) | |
Defined in Database.Persist.Sql.Class |
Methods
rawSqlCols :: (Text -> Text) -> a -> (Int, [Text]) #
rawSqlColCountReason :: a -> String #
rawSqlProcessRow :: [PersistValue] -> Either Text a #
Instances
(PersistEntity record, PersistEntityBackend record ~ backend, IsPersistBackend backend) => RawSql (Entity record) | |
Defined in Database.Persist.Sql.Class Methods rawSqlCols :: (Text -> Text) -> Entity record -> (Int, [Text]) # rawSqlColCountReason :: Entity record -> String # rawSqlProcessRow :: [PersistValue] -> Either Text (Entity record) # | |
(PersistEntity a, PersistEntityBackend a ~ backend, IsPersistBackend backend) => RawSql (Key a) | |
Defined in Database.Persist.Sql.Class Methods rawSqlCols :: (Text -> Text) -> Key a -> (Int, [Text]) # rawSqlColCountReason :: Key a -> String # rawSqlProcessRow :: [PersistValue] -> Either Text (Key a) # | |
PersistField a => RawSql (Single a) | |
Defined in Database.Persist.Sql.Class Methods rawSqlCols :: (Text -> Text) -> Single a -> (Int, [Text]) # rawSqlColCountReason :: Single a -> String # rawSqlProcessRow :: [PersistValue] -> Either Text (Single a) # | |
RawSql a => RawSql (Maybe a) | |
Defined in Database.Persist.Sql.Class Methods rawSqlCols :: (Text -> Text) -> Maybe a -> (Int, [Text]) # rawSqlColCountReason :: Maybe a -> String # rawSqlProcessRow :: [PersistValue] -> Either Text (Maybe a) # | |
(PersistEntity record, KnownSymbol prefix, PersistEntityBackend record ~ backend, IsPersistBackend backend) => RawSql (EntityWithPrefix prefix record) | |
Defined in Database.Persist.Sql.Class Methods rawSqlCols :: (Text -> Text) -> EntityWithPrefix prefix record -> (Int, [Text]) # rawSqlColCountReason :: EntityWithPrefix prefix record -> String # rawSqlProcessRow :: [PersistValue] -> Either Text (EntityWithPrefix prefix record) # | |
(RawSql a, RawSql b) => RawSql (a, b) | |
Defined in Database.Persist.Sql.Class Methods rawSqlCols :: (Text -> Text) -> (a, b) -> (Int, [Text]) # rawSqlColCountReason :: (a, b) -> String # rawSqlProcessRow :: [PersistValue] -> Either Text (a, b) # | |
(RawSql a, RawSql b, RawSql c) => RawSql (a, b, c) | |
Defined in Database.Persist.Sql.Class Methods rawSqlCols :: (Text -> Text) -> (a, b, c) -> (Int, [Text]) # rawSqlColCountReason :: (a, b, c) -> String # rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c) # | |
(RawSql a, RawSql b, RawSql c, RawSql d) => RawSql (a, b, c, d) | |
Defined in Database.Persist.Sql.Class Methods rawSqlCols :: (Text -> Text) -> (a, b, c, d) -> (Int, [Text]) # rawSqlColCountReason :: (a, b, c, d) -> String # rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d) # | |
(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e) => RawSql (a, b, c, d, e) | |
Defined in Database.Persist.Sql.Class Methods rawSqlCols :: (Text -> Text) -> (a, b, c, d, e) -> (Int, [Text]) # rawSqlColCountReason :: (a, b, c, d, e) -> String # rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e) # | |
(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f) => RawSql (a, b, c, d, e, f) | |
Defined in Database.Persist.Sql.Class Methods rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f) -> (Int, [Text]) # rawSqlColCountReason :: (a, b, c, d, e, f) -> String # rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f) # | |
(RawSql a, RawSql b, RawSql c, RawSql d, RawSql e, RawSql f, RawSql g) => RawSql (a, b, c, d, e, f, g) | |
Defined in Database.Persist.Sql.Class Methods rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g) -> (Int, [Text]) # rawSqlColCountReason :: (a, b, c, d, e, f, g) -> String # rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g) # | |
(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) | |
Defined in Database.Persist.Sql.Class Methods rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h) -> (Int, [Text]) # rawSqlColCountReason :: (a, b, c, d, e, f, g, h) -> String # rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h) # | |
(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) | |
Defined in Database.Persist.Sql.Class Methods rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i) -> (Int, [Text]) # rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i) -> String # rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i) # | |
(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) | |
Defined in Database.Persist.Sql.Class Methods rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i, j) -> (Int, [Text]) # rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j) -> String # rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j) # | |
(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) | |
Defined in Database.Persist.Sql.Class Methods rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i, j, k) -> (Int, [Text]) # rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k) -> String # rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k) # | |
(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) | |
Defined in Database.Persist.Sql.Class Methods rawSqlCols :: (Text -> Text) -> (a, b, c, d, e, f, g, h, i, j, k, l) -> (Int, [Text]) # rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l) -> String # rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l) # | |
(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) | |
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]) # rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> String # rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m) # | |
(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) | |
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]) # rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> String # rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m, n) # | |
(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) | |
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]) # rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> String # rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) # | |
(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) | |
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]) # rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) -> String # rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) # | |
(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) | |
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]) # rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) -> String # rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) # | |
(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) | |
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]) # rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) -> String # rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) # | |
(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) | |
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]) # rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) -> String # rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) # | |
(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) | |
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]) # rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) -> String # rawSqlProcessRow :: [PersistValue] -> Either Text (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) # | |
(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) | |
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]) # rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) -> String # 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) # | |
(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) | |
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]) # rawSqlColCountReason :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) -> String # 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) # | |
(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) | |
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]) # 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 # 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) # | |
(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) | |
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]) # 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 # 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) # | |
(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) | |
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]) # 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 # 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) # | |
(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) | |
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]) # 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 # 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) # | |
(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) | |
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]) # 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 # 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) # | |
(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) | |
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]) # 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 # 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) # | |
(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) | |
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]) # 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 # 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) # | |
(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) | |
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]) # 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 # 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) # | |
(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) | |
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]) # 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 # 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) # | |
(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) | |
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]) # 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 # 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) # | |
(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) | |
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]) # 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 # 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) # | |
(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) | |
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]) # 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 # 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) # | |
(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) | |
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]) # 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 # 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) # | |
(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) | |
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]) # 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 # 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) # | |
(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) | |
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]) # 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 # 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) # | |
(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) | |
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]) # 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 # 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) # | |
(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) | |
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]) # 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 # 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) # | |
(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) | |
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]) # 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 # 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) # | |
(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) | |
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]) # 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 # 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) # | |
(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) | |
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]) # 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 # 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) # | |
(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) | |
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]) # 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 # 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) # | |
(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) | |
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]) # 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 # 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) # | |
(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) | |
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]) # 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 # 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) # | |
(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) | |
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]) # 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 # 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) # | |
(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) | |
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]) # 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 # 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) # | |
(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) | |
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]) # 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 # 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) # | |
(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) | |
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]) # 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 # 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) # | |
(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) | |
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]) # 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 # 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) # | |
(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) | |
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]) # 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 # 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) # | |
(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) | |
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]) # 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 # 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) # | |
(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) | |
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]) # 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 # 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) # | |
(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) | |
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]) # 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 # 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) # | |
(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) | |
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]) # 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 # 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) # | |
(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) | |
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]) # 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 # 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) # | |
(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) | |
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]) # 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 # 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) # | |
(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) | |
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]) # 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 # 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) # | |
(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) | |
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]) # 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 # 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) # | |
(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) | |
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]) # 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 # 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) # | |
(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) | |
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]) # 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 # 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) # | |
(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) | |
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]) # 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 # 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) # |
unPrefix :: forall (prefix :: Symbol) record. EntityWithPrefix prefix record -> Entity record #
getBackendSpecificForeignKeyName :: BackendSpecificOverrides -> Maybe (EntityNameDB -> FieldNameDB -> ConstraintNameDB) #
setBackendSpecificForeignKeyName :: (EntityNameDB -> FieldNameDB -> ConstraintNameDB) -> BackendSpecificOverrides -> BackendSpecificOverrides #
newtype PersistUnsafeMigrationException #
Constructors
PersistUnsafeMigrationException [(Bool, Sql)] |
Instances
Exception PersistUnsafeMigrationException | |
Defined in Database.Persist.Sql.Migration Methods toException :: PersistUnsafeMigrationException -> SomeException fromException :: SomeException -> Maybe PersistUnsafeMigrationException displayException :: PersistUnsafeMigrationException -> String | |
Show PersistUnsafeMigrationException | |
Defined in Database.Persist.Sql.Migration Methods showsPrec :: Int -> PersistUnsafeMigrationException -> ShowS show :: PersistUnsafeMigrationException -> String showList :: [PersistUnsafeMigrationException] -> ShowS |
addMigration :: Bool -> Sql -> Migration #
getMigration :: forall (m :: Type -> Type). (MonadIO m, HasCallStack) => Migration -> ReaderT SqlBackend m [Sql] #
parseMigration :: forall (m :: Type -> Type). (HasCallStack, MonadIO m) => Migration -> ReaderT SqlBackend m (Either [Text] CautiousMigration) #
parseMigration' :: forall (m :: Type -> Type). (HasCallStack, MonadIO m) => Migration -> ReaderT SqlBackend m CautiousMigration #
printMigration :: forall (m :: Type -> Type). (HasCallStack, MonadIO m) => Migration -> ReaderT SqlBackend m () #
reportErrors :: [Text] -> Migration #
runMigration :: forall (m :: Type -> Type). MonadIO m => Migration -> ReaderT SqlBackend m () #
runMigrationQuiet :: forall (m :: Type -> Type). MonadIO m => Migration -> ReaderT SqlBackend m [Text] #
runMigrationSilent :: forall (m :: Type -> Type). MonadUnliftIO m => Migration -> ReaderT SqlBackend m [Text] #
runMigrationUnsafe :: forall (m :: Type -> Type). MonadIO m => Migration -> ReaderT SqlBackend m () #
runMigrationUnsafeQuiet :: forall (m :: Type -> Type). (HasCallStack, MonadIO m) => Migration -> ReaderT SqlBackend m [Text] #
runSqlCommand :: SqlPersistT IO () -> Migration #
showMigration :: forall (m :: Type -> Type). (HasCallStack, MonadIO m) => Migration -> ReaderT SqlBackend m [Text] #
data FilterTablePrefix #
Constructors
PrefixTableName | |
PrefixExcluded |
deleteWhereCount :: forall val (m :: Type -> Type) backend. (PersistEntity val, MonadIO m, PersistEntityBackend val ~ SqlBackend, BackendCompatible SqlBackend backend) => [Filter 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 #
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 #
fieldDBName :: PersistEntity record => EntityField record typ -> FieldNameDB #
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 #
toSqlKey :: ToBackendKey SqlBackend record => Int64 -> Key record #
withRawQuery :: forall (m :: Type -> Type) a. MonadIO m => Text -> [PersistValue] -> ConduitM [PersistValue] Void IO a -> ReaderT SqlBackend m a #
getStmtConn :: SqlBackend -> Text -> IO Statement #
rawExecuteCount :: forall (m :: Type -> Type) backend. (MonadIO m, BackendCompatible SqlBackend backend) => Text -> [PersistValue] -> ReaderT backend m Int64 #
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 ())) #
rawSql :: forall a (m :: Type -> Type) backend. (RawSql a, MonadIO m, BackendCompatible SqlBackend backend) => Text -> [PersistValue] -> ReaderT backend m [a] #
acquireSqlConn :: (MonadReader backend m, BackendCompatible SqlBackend backend) => m (Acquire backend) #
acquireSqlConnWithIsolation :: (MonadReader backend m, BackendCompatible SqlBackend backend) => IsolationLevel -> m (Acquire backend) #
liftSqlPersistMPool :: forall backend m a. (MonadIO m, BackendCompatible SqlBackend backend) => ReaderT backend (NoLoggingT (ResourceT IO)) a -> Pool backend -> m a #
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 #
runSqlPoolNoTransaction :: forall backend m a. (MonadUnliftIO m, BackendCompatible SqlBackend backend) => ReaderT backend m a -> Pool backend -> Maybe IsolationLevel -> 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 #
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 #
runSqlPoolWithIsolation :: forall backend m a. (MonadUnliftIO m, BackendCompatible SqlBackend backend) => ReaderT backend m a -> Pool backend -> IsolationLevel -> m a #
withSqlPoolWithConfig :: forall backend m a. (MonadLoggerIO m, MonadUnliftIO m, BackendCompatible SqlBackend backend) => (LogFunc -> IO backend) -> ConnectionPoolConfig -> (Pool backend -> m a) -> m a #
data PersistentSqlException #
Constructors
StatementAlreadyFinalized Text | |
Couldn'tGetSQLConnection |
Instances
Exception PersistentSqlException | |
Defined in Database.Persist.Sql.Types Methods toException :: PersistentSqlException -> SomeException fromException :: SomeException -> Maybe PersistentSqlException displayException :: PersistentSqlException -> String | |
Show PersistentSqlException | |
Defined in Database.Persist.Sql.Types Methods showsPrec :: Int -> PersistentSqlException -> ShowS show :: PersistentSqlException -> String showList :: [PersistentSqlException] -> ShowS |
Instances
Read a => Read (Single a) | |
Defined in Database.Persist.Sql.Types | |
Show a => Show (Single a) | |
Eq a => Eq (Single a) | |
Ord a => Ord (Single a) | |
Defined in Database.Persist.Sql.Types | |
PersistField a => RawSql (Single a) | |
Defined in Database.Persist.Sql.Class Methods rawSqlCols :: (Text -> Text) -> Single a -> (Int, [Text]) # rawSqlColCountReason :: Single a -> String # rawSqlProcessRow :: [PersistValue] -> Either Text (Single a) # |
type SqlPersistM = SqlPersistT (NoLoggingT (ResourceT IO)) #
type IsSqlBackend backend = (IsPersistBackend backend, BaseBackend backend ~ SqlBackend) #
type SqlBackendCanRead backend = (BackendCompatible SqlBackend backend, PersistQueryRead backend, PersistStoreRead backend, PersistUniqueRead backend) #
type SqlBackendCanWrite backend = (SqlBackendCanRead backend, PersistQueryWrite backend, PersistStoreWrite backend, PersistUniqueWrite backend) #
newtype SqlReadBackend #
Constructors
SqlReadBackend | |
Fields |
Instances
HasPersistBackend SqlReadBackend | |||||
Defined in Database.Persist.Sql.Types.Internal Associated Types
Methods persistBackend :: SqlReadBackend -> BaseBackend SqlReadBackend # | |||||
IsPersistBackend SqlReadBackend | |||||
Defined in Database.Persist.Sql.Types.Internal Methods mkPersistBackend :: BaseBackend SqlReadBackend -> SqlReadBackend | |||||
newtype BackendKey SqlReadBackend | |||||
Defined in Database.Persist.Sql.Orphan.PersistStore | |||||
type BaseBackend SqlReadBackend | |||||
Defined in Database.Persist.Sql.Types.Internal | |||||
type Rep (BackendKey SqlReadBackend) | |||||
Defined in Database.Persist.Sql.Orphan.PersistStore type Rep (BackendKey SqlReadBackend) = D1 ('MetaData "BackendKey" "Database.Persist.Sql.Orphan.PersistStore" "persistent-2.14.6.3-4rUXkEyv9IqGc70msb2CM1" 'True) (C1 ('MetaCons "SqlReadBackendKey" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSqlReadBackendKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int64))) |
type SqlReadT (m :: Type -> Type) a = forall backend. SqlBackendCanRead backend => ReaderT backend m a #
newtype SqlWriteBackend #
Constructors
SqlWriteBackend | |
Fields |
Instances
HasPersistBackend SqlWriteBackend | |||||
Defined in Database.Persist.Sql.Types.Internal Associated Types
Methods persistBackend :: SqlWriteBackend -> BaseBackend SqlWriteBackend # | |||||
IsPersistBackend SqlWriteBackend | |||||
Defined in Database.Persist.Sql.Types.Internal Methods mkPersistBackend :: BaseBackend SqlWriteBackend -> SqlWriteBackend | |||||
newtype BackendKey SqlWriteBackend | |||||
Defined in Database.Persist.Sql.Orphan.PersistStore | |||||
type BaseBackend SqlWriteBackend | |||||
Defined in Database.Persist.Sql.Types.Internal | |||||
type Rep (BackendKey SqlWriteBackend) | |||||
Defined in Database.Persist.Sql.Orphan.PersistStore type Rep (BackendKey SqlWriteBackend) = D1 ('MetaData "BackendKey" "Database.Persist.Sql.Orphan.PersistStore" "persistent-2.14.6.3-4rUXkEyv9IqGc70msb2CM1" 'True) (C1 ('MetaCons "SqlWriteBackendKey" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSqlWriteBackendKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int64))) |
type SqlWriteT (m :: Type -> Type) a = forall backend. SqlBackendCanWrite backend => ReaderT backend m a #
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 #
data IsolationLevel #
Constructors
ReadUncommitted | |
ReadCommitted | |
RepeatableRead | |
Serializable |
Instances
Bounded IsolationLevel | |
Enum IsolationLevel | |
Defined in Database.Persist.SqlBackend.Internal.IsolationLevel Methods succ :: IsolationLevel -> IsolationLevel pred :: IsolationLevel -> IsolationLevel toEnum :: Int -> IsolationLevel fromEnum :: IsolationLevel -> Int enumFrom :: IsolationLevel -> [IsolationLevel] enumFromThen :: IsolationLevel -> IsolationLevel -> [IsolationLevel] enumFromTo :: IsolationLevel -> IsolationLevel -> [IsolationLevel] enumFromThenTo :: IsolationLevel -> IsolationLevel -> IsolationLevel -> [IsolationLevel] | |
Show IsolationLevel | |
Defined in Database.Persist.SqlBackend.Internal.IsolationLevel Methods showsPrec :: Int -> IsolationLevel -> ShowS show :: IsolationLevel -> String showList :: [IsolationLevel] -> ShowS | |
Eq IsolationLevel | |
Defined in Database.Persist.SqlBackend.Internal.IsolationLevel Methods (==) :: IsolationLevel -> IsolationLevel -> Bool (/=) :: IsolationLevel -> IsolationLevel -> Bool | |
Ord IsolationLevel | |
Defined in Database.Persist.SqlBackend.Internal.IsolationLevel Methods compare :: IsolationLevel -> IsolationLevel -> Ordering (<) :: IsolationLevel -> IsolationLevel -> Bool (<=) :: IsolationLevel -> IsolationLevel -> Bool (>) :: IsolationLevel -> IsolationLevel -> Bool (>=) :: IsolationLevel -> IsolationLevel -> Bool max :: IsolationLevel -> IsolationLevel -> IsolationLevel min :: IsolationLevel -> IsolationLevel -> IsolationLevel |
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 () #
data SqliteConf Source #
Information required to setup a connection pool.
Constructors
SqliteConf | |
Fields
| |
SqliteConfInfo | |
Fields
|
Instances
FromJSON SqliteConf Source # | |||||||||
Defined in Database.Persist.Sqlite Methods parseJSON :: Value -> Parser SqliteConf parseJSONList :: Value -> Parser [SqliteConf] omittedField :: Maybe SqliteConf | |||||||||
Show SqliteConf Source # | |||||||||
Defined in Database.Persist.Sqlite Methods showsPrec :: Int -> SqliteConf -> ShowS show :: SqliteConf -> String showList :: [SqliteConf] -> ShowS | |||||||||
PersistConfig SqliteConf Source # | |||||||||
Defined in Database.Persist.Sqlite Associated Types
Methods loadConfig :: Value -> Parser SqliteConf # applyEnv :: SqliteConf -> IO SqliteConf # createPoolConfig :: SqliteConf -> IO (PersistConfigPool SqliteConf) # runPool :: MonadUnliftIO m => SqliteConf -> PersistConfigBackend SqliteConf m a -> PersistConfigPool SqliteConf -> m a # | |||||||||
type PersistConfigBackend SqliteConf Source # | |||||||||
Defined in Database.Persist.Sqlite | |||||||||
type PersistConfigPool SqliteConf Source # | |||||||||
Defined in Database.Persist.Sqlite |
data SqliteConnectionInfo Source #
Information required to connect to a sqlite database. We export lenses instead of fields to avoid being limited to the current implementation.
Since: 2.6.2
Instances
FromJSON SqliteConnectionInfo Source # | |
Defined in Database.Persist.Sqlite Methods parseJSON :: Value -> Parser SqliteConnectionInfo parseJSONList :: Value -> Parser [SqliteConnectionInfo] omittedField :: Maybe SqliteConnectionInfo | |
Show SqliteConnectionInfo Source # | |
Defined in Database.Persist.Sqlite Methods showsPrec :: Int -> SqliteConnectionInfo -> ShowS show :: SqliteConnectionInfo -> String showList :: [SqliteConnectionInfo] -> ShowS |
mkSqliteConnectionInfo :: Text -> SqliteConnectionInfo Source #
Creates a SqliteConnectionInfo from a connection string, with the default settings.
Since: 2.6.2
sqlConnectionStr :: Lens' SqliteConnectionInfo Text Source #
walEnabled :: Lens' SqliteConnectionInfo Bool Source #
fkEnabled :: Lens' SqliteConnectionInfo Bool Source #
extraPragmas :: Lens' SqliteConnectionInfo [Text] Source #
Arguments
:: MonadUnliftIO m | |
=> Text | connection string |
-> ReaderT SqlBackend (NoLoggingT (ResourceT m)) a | database action |
-> m a |
A convenience helper which creates a new database connection and runs the
given block, handling MonadResource
and MonadLogger
requirements. Note
that all log messages are discarded.
Since: 1.1.4
Arguments
:: MonadUnliftIO m | |
=> SqliteConnectionInfo | |
-> ReaderT SqlBackend (NoLoggingT (ResourceT m)) a | database action |
-> m a |
A convenience helper which creates a new database connection and runs the
given block, handling MonadResource
and MonadLogger
requirements. Note
that all log messages are discarded.
Since: 2.6.2
wrapConnection :: Connection -> LogFunc -> IO SqlBackend Source #
Wrap up a raw Connection
as a Persistent SQL Connection
.
Example usage
{-# LANGUAGE GADTs #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} import Control.Monad.IO.Class (liftIO) 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 |] main :: IO () main = do conn <- open "/home/sibi/test.db" (backend :: SqlBackend) <- wrapConnection conn (\_ _ _ _ -> return ()) flip runSqlPersistM backend $ do runMigration migrateAll insert_ $ Person "John doe" $ Just 35 insert_ $ Person "Hema" $ Just 36 (pers :: [Entity Person]) <- selectList [] [] liftIO $ print pers close' backend
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}}]
Since: 1.1.5
wrapConnectionInfo :: SqliteConnectionInfo -> Connection -> LogFunc -> IO SqlBackend Source #
Wrap up a raw Connection
as a Persistent SQL
Connection
, allowing full control over WAL and FK constraints.
Since: 2.6.2
mockMigration :: Migration -> IO () Source #
Mock a migration even when the database is not present.
This function performs the same functionality of printMigration
with the difference that an actual database isn't needed for it.
retryOnBusy :: (MonadUnliftIO m, MonadLoggerIO m) => m a -> m a Source #
Retry if a Busy is thrown, following an exponential backoff strategy.
Since: 2.9.3
waitForDatabase :: forall (m :: Type -> Type) backend. (MonadUnliftIO m, MonadLoggerIO m, BackendCompatible SqlBackend backend) => ReaderT backend m () Source #
Wait until some noop action on the database does not return an ErrorBusy
. See retryOnBusy
.
Since: 2.9.3
data ForeignKeyViolation Source #
Data type for reporting foreign key violations using checkForeignKeys
.
Since: 2.11.1
Constructors
ForeignKeyViolation | |
Fields
|
Instances
Show ForeignKeyViolation Source # | |
Defined in Database.Persist.Sqlite Methods showsPrec :: Int -> ForeignKeyViolation -> ShowS show :: ForeignKeyViolation -> String showList :: [ForeignKeyViolation] -> ShowS | |
Eq ForeignKeyViolation Source # | |
Defined in Database.Persist.Sqlite Methods (==) :: ForeignKeyViolation -> ForeignKeyViolation -> Bool (/=) :: ForeignKeyViolation -> ForeignKeyViolation -> Bool | |
Ord ForeignKeyViolation Source # | |
Defined in Database.Persist.Sqlite Methods compare :: ForeignKeyViolation -> ForeignKeyViolation -> Ordering (<) :: ForeignKeyViolation -> ForeignKeyViolation -> Bool (<=) :: ForeignKeyViolation -> ForeignKeyViolation -> Bool (>) :: ForeignKeyViolation -> ForeignKeyViolation -> Bool (>=) :: ForeignKeyViolation -> ForeignKeyViolation -> Bool max :: ForeignKeyViolation -> ForeignKeyViolation -> ForeignKeyViolation min :: ForeignKeyViolation -> ForeignKeyViolation -> ForeignKeyViolation |
checkForeignKeys :: forall (m :: Type -> Type) env. (MonadResource m, MonadReader env m, BackendCompatible SqlBackend env) => ConduitM () ForeignKeyViolation m () Source #
Outputs all (if any) the violated foreign key constraints in the database.
The main use is to validate that no foreign key constraints were
broken/corrupted by anyone operating on the database with foreign keys
disabled. See fkEnabled
.
Since: 2.11.1
data RawSqlite backend Source #
Wrapper for persistent SqlBackends that carry the corresponding
Connection
.
Since: 2.10.2
Instances
BackendCompatible b (RawSqlite b) Source # | |||||
Defined in Database.Persist.Sqlite Methods projectBackend :: RawSqlite b -> b # | |||||
(PersistCore b, PersistCore (RawSqlite b), FromJSON (BackendKey b)) => FromJSON (BackendKey (RawSqlite b)) Source # | |||||
Defined in Database.Persist.Sqlite Methods parseJSON :: Value -> Parser (BackendKey (RawSqlite b)) parseJSONList :: Value -> Parser [BackendKey (RawSqlite b)] omittedField :: Maybe (BackendKey (RawSqlite b)) | |||||
(PersistCore b, PersistCore (RawSqlite b), ToJSON (BackendKey b)) => ToJSON (BackendKey (RawSqlite b)) Source # | |||||
Defined in Database.Persist.Sqlite Methods toJSON :: BackendKey (RawSqlite b) -> Value toEncoding :: BackendKey (RawSqlite b) -> Encoding toJSONList :: [BackendKey (RawSqlite b)] -> Value toEncodingList :: [BackendKey (RawSqlite b)] -> Encoding omitField :: BackendKey (RawSqlite b) -> Bool | |||||
(PersistCore b, PersistCore (RawSqlite b), Bounded (BackendKey b)) => Bounded (BackendKey (RawSqlite b)) Source # | |||||
Defined in Database.Persist.Sqlite | |||||
(PersistCore b, PersistCore (RawSqlite b), Enum (BackendKey b)) => Enum (BackendKey (RawSqlite b)) Source # | |||||
Defined in Database.Persist.Sqlite Methods succ :: BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) pred :: BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) toEnum :: Int -> BackendKey (RawSqlite b) fromEnum :: BackendKey (RawSqlite b) -> Int enumFrom :: BackendKey (RawSqlite b) -> [BackendKey (RawSqlite b)] enumFromThen :: BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) -> [BackendKey (RawSqlite b)] enumFromTo :: BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) -> [BackendKey (RawSqlite b)] enumFromThenTo :: BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) -> [BackendKey (RawSqlite b)] | |||||
(PersistCore b, PersistCore (RawSqlite b), Num (BackendKey b)) => Num (BackendKey (RawSqlite b)) Source # | |||||
Defined in Database.Persist.Sqlite Methods (+) :: BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) (-) :: BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) (*) :: BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) negate :: BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) abs :: BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) signum :: BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) fromInteger :: Integer -> BackendKey (RawSqlite b) | |||||
(PersistCore b, PersistCore (RawSqlite b), Read (BackendKey b)) => Read (BackendKey (RawSqlite b)) Source # | |||||
Defined in Database.Persist.Sqlite Methods readsPrec :: Int -> ReadS (BackendKey (RawSqlite b)) readList :: ReadS [BackendKey (RawSqlite b)] readPrec :: ReadPrec (BackendKey (RawSqlite b)) readListPrec :: ReadPrec [BackendKey (RawSqlite b)] | |||||
(PersistCore b, PersistCore (RawSqlite b), Integral (BackendKey b)) => Integral (BackendKey (RawSqlite b)) Source # | |||||
Defined in Database.Persist.Sqlite Methods quot :: BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) rem :: BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) div :: BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) mod :: BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) quotRem :: BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) -> (BackendKey (RawSqlite b), BackendKey (RawSqlite b)) divMod :: BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) -> (BackendKey (RawSqlite b), BackendKey (RawSqlite b)) toInteger :: BackendKey (RawSqlite b) -> Integer | |||||
(PersistCore b, PersistCore (RawSqlite b), Real (BackendKey b)) => Real (BackendKey (RawSqlite b)) Source # | |||||
Defined in Database.Persist.Sqlite Methods toRational :: BackendKey (RawSqlite b) -> Rational | |||||
(PersistCore b, PersistCore (RawSqlite b), Show (BackendKey b)) => Show (BackendKey (RawSqlite b)) Source # | |||||
Defined in Database.Persist.Sqlite Methods showsPrec :: Int -> BackendKey (RawSqlite b) -> ShowS show :: BackendKey (RawSqlite b) -> String showList :: [BackendKey (RawSqlite b)] -> ShowS | |||||
(PersistCore b, PersistCore (RawSqlite b), Eq (BackendKey b)) => Eq (BackendKey (RawSqlite b)) Source # | |||||
Defined in Database.Persist.Sqlite Methods (==) :: BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) -> Bool (/=) :: BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) -> Bool | |||||
(PersistCore b, PersistCore (RawSqlite b), Ord (BackendKey b)) => Ord (BackendKey (RawSqlite b)) Source # | |||||
Defined in Database.Persist.Sqlite Methods compare :: BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) -> Ordering (<) :: BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) -> Bool (<=) :: BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) -> Bool (>) :: BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) -> Bool (>=) :: BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) -> Bool max :: BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) min :: BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) -> BackendKey (RawSqlite b) | |||||
(PersistCore b, PersistCore (RawSqlite b), PersistField (BackendKey b)) => PersistField (BackendKey (RawSqlite b)) Source # | |||||
Defined in Database.Persist.Sqlite Methods toPersistValue :: BackendKey (RawSqlite b) -> PersistValue # fromPersistValue :: PersistValue -> Either Text (BackendKey (RawSqlite b)) # | |||||
(HasPersistBackend b, PersistQueryRead b) => PersistQueryRead (RawSqlite b) Source # | |||||
Defined in Database.Persist.Sqlite Methods selectSourceRes :: forall record (m1 :: Type -> Type) (m2 :: Type -> Type). (PersistRecordBackend record (RawSqlite b), MonadIO m1, MonadIO m2) => [Filter record] -> [SelectOpt record] -> ReaderT (RawSqlite b) m1 (Acquire (ConduitM () (Entity record) m2 ())) # selectFirst :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record (RawSqlite b)) => [Filter record] -> [SelectOpt record] -> ReaderT (RawSqlite b) m (Maybe (Entity record)) # selectKeysRes :: forall (m1 :: Type -> Type) (m2 :: Type -> Type) record. (MonadIO m1, MonadIO m2, PersistRecordBackend record (RawSqlite b)) => [Filter record] -> [SelectOpt record] -> ReaderT (RawSqlite b) m1 (Acquire (ConduitM () (Key record) m2 ())) # count :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record (RawSqlite b)) => [Filter record] -> ReaderT (RawSqlite b) m Int # exists :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record (RawSqlite b)) => [Filter record] -> ReaderT (RawSqlite b) m Bool # | |||||
(HasPersistBackend b, PersistQueryWrite b) => PersistQueryWrite (RawSqlite b) Source # | |||||
Defined in Database.Persist.Sqlite Methods updateWhere :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record (RawSqlite b)) => [Filter record] -> [Update record] -> ReaderT (RawSqlite b) m () # deleteWhere :: forall (m :: Type -> Type) record. (MonadIO m, PersistRecordBackend record (RawSqlite b)) => [Filter record] -> ReaderT (RawSqlite b) m () # | |||||
HasPersistBackend b => HasPersistBackend (RawSqlite b) Source # | |||||
Defined in Database.Persist.Sqlite Associated Types
Methods persistBackend :: RawSqlite b -> BaseBackend (RawSqlite b) # | |||||
PersistCore b => PersistCore (RawSqlite b) Source # | |||||
Defined in Database.Persist.Sqlite Associated Types
| |||||
(HasPersistBackend b, PersistStoreRead b) => PersistStoreRead (RawSqlite b) Source # | |||||
Defined in Database.Persist.Sqlite Methods get :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b)) => Key record -> ReaderT (RawSqlite b) m (Maybe record) # getMany :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b)) => [Key record] -> ReaderT (RawSqlite b) m (Map (Key record) record) # | |||||
(HasPersistBackend b, PersistStoreWrite b) => PersistStoreWrite (RawSqlite b) Source # | |||||
Defined in Database.Persist.Sqlite Methods insert :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b), SafeToInsert record) => record -> ReaderT (RawSqlite b) m (Key record) # insert_ :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b), SafeToInsert record) => record -> ReaderT (RawSqlite b) m () # insertMany :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b), SafeToInsert record) => [record] -> ReaderT (RawSqlite b) m [Key record] # insertMany_ :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b), SafeToInsert record) => [record] -> ReaderT (RawSqlite b) m () # insertEntityMany :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b)) => [Entity record] -> ReaderT (RawSqlite b) m () # insertKey :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b)) => Key record -> record -> ReaderT (RawSqlite b) m () # repsert :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b)) => Key record -> record -> ReaderT (RawSqlite b) m () # repsertMany :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b)) => [(Key record, record)] -> ReaderT (RawSqlite b) m () # replace :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b)) => Key record -> record -> ReaderT (RawSqlite b) m () # delete :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b)) => Key record -> ReaderT (RawSqlite b) m () # update :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b)) => Key record -> [Update record] -> ReaderT (RawSqlite b) m () # updateGet :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b)) => Key record -> [Update record] -> ReaderT (RawSqlite b) m record # | |||||
(HasPersistBackend b, PersistUniqueRead b) => PersistUniqueRead (RawSqlite b) Source # | |||||
Defined in Database.Persist.Sqlite Methods getBy :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b)) => Unique record -> ReaderT (RawSqlite b) m (Maybe (Entity record)) # existsBy :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b)) => Unique record -> ReaderT (RawSqlite b) m Bool # | |||||
(HasPersistBackend b, PersistUniqueWrite b) => PersistUniqueWrite (RawSqlite b) Source # | |||||
Defined in Database.Persist.Sqlite Methods deleteBy :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b)) => Unique record -> ReaderT (RawSqlite b) m () # insertUnique :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b), SafeToInsert record) => record -> ReaderT (RawSqlite b) m (Maybe (Key record)) # insertUnique_ :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b), SafeToInsert record) => record -> ReaderT (RawSqlite b) m (Maybe ()) # upsert :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b), OnlyOneUniqueKey record, SafeToInsert record) => record -> [Update record] -> ReaderT (RawSqlite b) m (Entity record) # upsertBy :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b), SafeToInsert record) => Unique record -> record -> [Update record] -> ReaderT (RawSqlite b) m (Entity record) # putMany :: forall record (m :: Type -> Type). (MonadIO m, PersistRecordBackend record (RawSqlite b), SafeToInsert record) => [record] -> ReaderT (RawSqlite b) m () # | |||||
(PersistCore b, PersistCore (RawSqlite b), PersistFieldSql (BackendKey b)) => PersistFieldSql (BackendKey (RawSqlite b)) Source # | |||||
Defined in Database.Persist.Sqlite Methods sqlType :: Proxy (BackendKey (RawSqlite b)) -> SqlType # | |||||
newtype BackendKey (RawSqlite b) Source # | |||||
Defined in Database.Persist.Sqlite newtype BackendKey (RawSqlite b) = RawSqliteKey {
| |||||
type BaseBackend (RawSqlite b0) Source # | |||||
Defined in Database.Persist.Sqlite |
openRawSqliteConn :: (MonadUnliftIO m, MonadLoggerIO m) => SqliteConnectionInfo -> m (RawSqlite SqlBackend) Source #
Open a
connection from a RawSqlite
SqlBackend
SqliteConnectionInfo
.
When using this function, the caller has to accept the responsibility of
cleaning up the resulting connection. To do this, use close
with the
rawSqliteConnection
- it's enough to simply drop the persistBackend
afterwards.
Since: 2.13.2
persistentBackend :: forall backend1 backend2 f. Functor f => (backend1 -> f backend2) -> RawSqlite backend1 -> f (RawSqlite backend2) Source #
rawSqliteConnection :: forall backend f. Functor f => (Connection -> f Connection) -> RawSqlite backend -> f (RawSqlite backend) Source #
withRawSqliteConnInfo :: (MonadUnliftIO m, MonadLoggerIO m) => SqliteConnectionInfo -> (RawSqlite SqlBackend -> m a) -> m a Source #
Like withSqliteConnInfo
, but exposes the internal Connection
.
For power users who want to manually interact with SQLite's C API via
internals exposed by Database.Sqlite.Internal
Since: 2.10.2
createRawSqlitePoolFromInfo Source #
Arguments
:: (MonadLoggerIO m, MonadUnliftIO m) | |
=> SqliteConnectionInfo | |
-> (RawSqlite SqlBackend -> m ()) | An action that is run whenever a new |
-> Int | |
-> m (Pool (RawSqlite SqlBackend)) |
Like createSqlitePoolFromInfo
, but like withRawSqliteConnInfo
it
exposes the internal Connection
.
For power users who want to manually interact with SQLite's C API via internals exposed by Database.Sqlite.Internal. The callback can be used to run arbitrary actions on the connection upon allocation from the pool.
Since: 2.10.6
createRawSqlitePoolFromInfo_ :: (MonadLoggerIO m, MonadUnliftIO m) => SqliteConnectionInfo -> Int -> m (Pool (RawSqlite SqlBackend)) Source #
Like createRawSqlitePoolFromInfo
, but doesn't require a callback
operating on the connection.
Since: 2.10.6
withRawSqlitePoolInfo Source #
Arguments
:: (MonadUnliftIO m, MonadLoggerIO m) | |
=> SqliteConnectionInfo | |
-> (RawSqlite SqlBackend -> m ()) | |
-> Int | number of connections to open |
-> (Pool (RawSqlite SqlBackend) -> m a) | |
-> m a |
Like createSqlitePoolInfo
, but based on createRawSqlitePoolFromInfo
.
Since: 2.10.6
withRawSqlitePoolInfo_ Source #
Arguments
:: (MonadUnliftIO m, MonadLoggerIO m) | |
=> SqliteConnectionInfo | |
-> Int | number of connections to open |
-> (Pool (RawSqlite SqlBackend) -> m a) | |
-> m a |
Like createSqlitePoolInfo
, but based on createRawSqlitePoolFromInfo_
.
Since: 2.10.6