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. putMany :: forall record (m :: Type -> Type) . (PersistUniqueWrite backend, MonadIO m, PersistRecordBackend record backend, SafeToInsert record) => [record] -> ReaderT backend m ()

    esqueleto Database.Esqueleto.Legacy

    Put many records into db

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

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

    esqueleto Database.Esqueleto.Legacy

    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      |
    +-----+----------------+---------+
    

  3. many :: Alternative f => f a -> f [a]

    flatparse FlatParse.Basic

    Zero or more.

    Examples

    >>> many (putStr "la")
    lalalalalalalalala... * goes on forever *
    
    >>> many Nothing
    Just []
    
    >>> take 5 <$> many (Just 1)
    * hangs forever *
    
    Note that this function can be used with Parsers based on Applicatives. In that case many parser will attempt to parse parser zero or more times until it fails.

  4. skipAnyAsciiChar :: forall (st :: ZeroBitType) e . ParserT st e ()

    flatparse FlatParse.Basic

    Skip any single ASCII character (a single byte). More efficient than skipAnyChar for ASCII-only input.

  5. skipAnyChar :: forall (st :: ZeroBitType) e . ParserT st e ()

    flatparse FlatParse.Basic

    Skip any single Unicode character encoded using UTF-8.

  6. skipMany :: forall (st :: ZeroBitType) e a . ParserT st e a -> ParserT st e ()

    flatparse FlatParse.Basic

    Skip a parser zero or more times.

  7. withAnyResult :: forall (st :: ZeroBitType) t a e b . ParserT st t a -> (a -> ParserT st e b) -> ParserT st e b -> (t -> ParserT st e b) -> ParserT st e b

    flatparse FlatParse.Basic

    Run the parser, and handle each possible result.

  8. skipMany :: forall (st :: ZeroBitType) e a . ParserT st e a -> ParserT st e ()

    flatparse FlatParse.Basic.Base

    Skip a parser zero or more times.

  9. withAnyResult :: forall (st :: ZeroBitType) t a e b . ParserT st t a -> (a -> ParserT st e b) -> ParserT st e b -> (t -> ParserT st e b) -> ParserT st e b

    flatparse FlatParse.Basic.Base

    Run the parser, and handle each possible result.

  10. withAnyInt :: forall (st :: ZeroBitType) e r . (Int -> ParserT st e r) -> ParserT st e r

    flatparse FlatParse.Basic.Integers

    Parse any Int (native size) (CPS).

Page 150 of many | Previous | Next