Hoogle Search
Within LTS Haskell 24.49 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
hasql Hasql.TestingKit.Statements.WrongDecoder No documentation available.
Params :: Int64 -> Int64 -> Paramshasql Hasql.TestingKit.Statements.WrongDecoder No documentation available.
-
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 sessioninsertOrders :: [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)
PipelineError :: CommandError -> SessionErrorhasql Hasql.TestingKit.TestingDsl Error during the execution of a pipeline.
-
hs-opentelemetry-api OpenTelemetry.Attributes No documentation available.
-
hs-opentelemetry-api OpenTelemetry.Attributes.Attribute No documentation available.
module OpenTelemetry.
Processor Deprecated: use OpenTelemetry.Processor.Span instead
type
Processor = SpanProcessorhs-opentelemetry-api OpenTelemetry.Processor No documentation available.
-
hs-opentelemetry-api OpenTelemetry.Processor No documentation available.
module OpenTelemetry.
Propagator Cross-cutting concerns send their state to the next process using Propagators, which are defined as objects used to read and write context data to and from messages exchanged by the applications. Each concern creates a set of Propagators for every supported Propagator type. Propagators leverage the Context to inject and extract data for each cross-cutting concern, such as traces and Baggage. Propagation is usually implemented via a cooperation of library-specific request interceptors and Propagators, where the interceptors detect incoming and outgoing requests and use the Propagator's extract and inject operations respectively. The Propagators API is expected to be leveraged by users writing instrumentation libraries. However, users using the OpenTelemetry SDK may need to select appropriate propagators to work with existing 3rd party systems such as AWS.