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. data Params

    hasql Hasql.TestingKit.Statements.GenerateSeries

    No documentation available.

  2. Params :: Int64 -> Int64 -> Params

    hasql Hasql.TestingKit.Statements.GenerateSeries

    No documentation available.

  3. data Params

    hasql Hasql.TestingKit.Statements.WrongDecoder

    No documentation available.

  4. Params :: Int64 -> Int64 -> Params

    hasql Hasql.TestingKit.Statements.WrongDecoder

    No documentation available.

  5. data Pipeline a

    hasql Hasql.TestingKit.TestingDsl

    Composable abstraction over the execution of queries in the pipeline mode. It allows you to issue multiple queries to the server in much fewer network transactions. If the amounts of sent and received data do not surpass the buffer sizes in the driver and on the server it will be just a single roundtrip. Typically the buffer size is 8KB. This execution mode is much more efficient than running queries directly from Session, because in session every statement execution involves a dedicated network roundtrip. An obvious question rises then: why not execute all queries like that? In situations where the parameters depend on the result of another query it is impossible to execute them in parallel, because the client needs to receive the results of one query before sending the request to execute the next. This reasoning is essentially the same as the one for the difference between Applicative and Monad. That's why Pipeline does not have the Monad instance. To execute Pipeline lift it into Session via pipeline.

    Examples

    Insert-Many or Batch-Insert

    You can use pipeline to turn a single-row insert query into an efficient multi-row insertion session. In effect this should be comparable in performance to issuing a single multi-row insert statement. Given the following definition in a Statements module:
    insertOrder :: Statement OrderDetails OrderId
    
    You can lift it into the following session
    insertOrders :: [OrderDetails] -> Session [OrderId]
    insertOrders orders =
    pipeline $
    for orders $ \order ->
    statement order Statements.insertOrder
    

    Combining Queries

    Given the following definitions in a Statements module:
    selectOrderDetails :: Statement OrderId (Maybe OrderDetails)
    selectOrderProducts :: Statement OrderId [OrderProduct]
    selectOrderFinancialTransactions :: Statement OrderId [FinancialTransaction]
    
    You can combine them into a session using the ApplicativeDo extension as follows:
    selectEverythingAboutOrder :: OrderId -> Session (Maybe OrderDetails, [OrderProduct], [FinancialTransaction])
    selectEverythingAboutOrder orderId =
    pipeline $ do
    details <- statement orderId Statements.selectOrderDetails
    products <- statement orderId Statements.selectOrderProducts
    transactions <- statement orderId Statements.selectOrderFinancialTransactions
    pure (details, products, transactions)
    

  6. PipelineError :: CommandError -> SessionError

    hasql Hasql.TestingKit.TestingDsl

    Error during the execution of a pipeline.

  7. data Pandoc

    pandoc-types Text.Pandoc.Definition

    No documentation available.

  8. Pandoc :: Meta -> [Block] -> Pandoc

    pandoc-types Text.Pandoc.Definition

    No documentation available.

  9. Para :: [Inline] -> Block

    pandoc-types Text.Pandoc.Definition

    Paragraph

  10. Period :: ListNumberDelim

    pandoc-types Text.Pandoc.Definition

    No documentation available.

Page 340 of many | Previous | Next