Hoogle Search

Within LTS Haskell 24.40 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. insertMany_ :: forall record (m :: Type -> Type) . (PersistStoreWrite backend, MonadIO m, PersistRecordBackend record backend, SafeToInsert record) => [record] -> ReaderT backend m ()

    hledger-web Hledger.Web.Import

    Same as insertMany, but doesn't return any Keys. The MongoDB, PostgreSQL, SQLite and MySQL backends insert all records in one database query.

    Example usage

    With schema-1 and dataset-1,
    insertUsers_ :: MonadIO m => ReaderT SqlBackend m ()
    insertUsers_ = insertMany_ [User "John" 30, User "Nick" 32, User "Jane" 20]
    
    The above query when applied on dataset-1, will produce this:
    +-----+------+-----+
    |id   |name  |age  |
    +-----+------+-----+
    |1    |SPJ   |40   |
    +-----+------+-----+
    |2    |Simon |41   |
    +-----+------+-----+
    |3    |John  |30   |
    +-----+------+-----+
    |4    |Nick  |32   |
    +-----+------+-----+
    |5    |Jane  |20   |
    +-----+------+-----+
    

  2. persistManyFileWith :: PersistSettings -> [FilePath] -> Q Exp

    hledger-web Hledger.Web.Import

    Same as persistFileWith, but uses several external files instead of one. Splitting your Persistent definitions into multiple modules can potentially dramatically speed up compile times. The recommended file extension is .persistentmodels.

    Examples

    Split your Persistent definitions into multiple files (models1, models2), then create a new module for each new file and run mkPersist there:
    -- Model1.hs
    share
    [mkPersist sqlSettings]
    $(persistFileWith lowerCaseSettings "models1")
    
    -- Model2.hs
    share
    [mkPersist sqlSettings]
    $(persistFileWith lowerCaseSettings "models2")
    
    Use persistManyFileWith to create your migrations:
    -- Migrate.hs
    mkMigrate "migrateAll"
    $(persistManyFileWith lowerCaseSettings ["models1.persistentmodels","models2.persistentmodels"])
    
    Tip: To get the same import behavior as if you were declaring all your models in one file, import your new files as Name into another file, then export module Name. This approach may be used in the future to reduce memory usage during compilation, but so far we've only seen mild reductions. See persistent#778 and persistent#791 for more details.

  3. putMany :: forall record (m :: Type -> Type) . (PersistUniqueWrite backend, MonadIO m, PersistRecordBackend record backend, SafeToInsert record) => [record] -> ReaderT backend m ()

    hledger-web Hledger.Web.Import

    Put many records into db

    • insert new records that do not exist (or violate any unique constraints)
    • replace existing records (matching any unique constraint)

  4. repsertMany :: forall record (m :: Type -> Type) . (PersistStoreWrite backend, MonadIO m, PersistRecordBackend record backend) => [(Key record, record)] -> ReaderT backend m ()

    hledger-web Hledger.Web.Import

    Put many entities into the database. Batch version of repsert for SQL backends. Useful when migrating data from one entity to another and want to preserve ids.

    Example usage

    With schema-1 and dataset-1,
    repsertManyUsers :: MonadIO m =>ReaderT SqlBackend m ()
    repsertManyusers = repsertMany [(simonId, User "Philip" 20), (unknownId999, User "Mr. X" 999)]
    
    The above query when applied on dataset-1, will produce this:
    +-----+----------------+---------+
    |id   |name            |age      |
    +-----+----------------+---------+
    |1    |SPJ             |40       |
    +-----+----------------+---------+
    |2    |Simon -> Philip |41 -> 20 |
    +-----+----------------+---------+
    |999  |Mr. X           |999      |
    +-----+----------------+---------+
    

  5. c'git_attr_get_many :: Ptr CString -> Ptr C'git_repository -> CUInt -> CString -> CSize -> Ptr CString -> IO CInt

    hlibgit2 Bindings.Libgit2.Attr

    No documentation available.

  6. p'git_attr_get_many :: FunPtr (Ptr CString -> Ptr C'git_repository -> CUInt -> CString -> CSize -> Ptr CString -> IO CInt)

    hlibgit2 Bindings.Libgit2.Attr

    No documentation available.

  7. c'git_merge_base_many :: Ptr C'git_oid -> Ptr C'git_repository -> Ptr C'git_oid -> CSize -> IO CInt

    hlibgit2 Bindings.Libgit2.Merge

    No documentation available.

  8. p'git_merge_base_many :: FunPtr (Ptr C'git_oid -> Ptr C'git_repository -> Ptr C'git_oid -> CSize -> IO CInt)

    hlibgit2 Bindings.Libgit2.Merge

    No documentation available.

  9. c'GIT_OBJ_ANY :: Num a => a

    hlibgit2 Bindings.Libgit2.Types

    No documentation available.

  10. data TooManyRedirects

    http-io-streams Network.Http.Client

    No documentation available.

Page 228 of many | Previous | Next