Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data QueryPlan = QueryPlan {
- _qpRequest :: QueryRequest
- _qpResponseReshaper :: forall m. MonadError QErr m => QueryResponse -> m Encoding
- data FieldsAndAggregates = FieldsAndAggregates {
- _faaFields :: HashMap FieldName Field
- _faaAggregates :: HashMap FieldName Aggregate
- newtype FieldPrefix = FieldPrefix (Maybe FieldName)
- noPrefix :: FieldPrefix
- prefixWith :: FieldName -> FieldPrefix
- applyPrefix :: FieldPrefix -> FieldName -> FieldName
- renderQuery :: QueryRequest -> Text
- mkPlan :: forall m. MonadError QErr m => SessionVariables -> SourceConfig -> QueryDB 'DataConnector Void (UnpreparedValue 'DataConnector) -> m QueryPlan
- queryHasRelations :: QueryRequest -> Bool
- data Cardinality
- reshapeResponseToQueryShape :: MonadError QErr m => QueryDB 'DataConnector Void (UnpreparedValue 'DataConnector) -> QueryResponse -> m Encoding
- reshapeSimpleSelectRows :: MonadError QErr m => Cardinality -> AnnFieldsG 'DataConnector Void (UnpreparedValue 'DataConnector) -> QueryResponse -> m Encoding
- reshapeTableAggregateFields :: MonadError QErr m => TableAggregateFieldsG 'DataConnector Void (UnpreparedValue 'DataConnector) -> QueryResponse -> m Encoding
- reshapeAggregateFields :: MonadError QErr m => FieldPrefix -> AggregateFields 'DataConnector -> KeyMap Value -> m Encoding
- reshapeAnnFields :: MonadError QErr m => FieldPrefix -> AnnFieldsG 'DataConnector Void (UnpreparedValue 'DataConnector) -> KeyMap FieldValue -> m Encoding
- encodeAssocListAsObject :: [(Text, Encoding)] -> Encoding
- reshapeField :: MonadError QErr m => AnnFieldG 'DataConnector Void (UnpreparedValue 'DataConnector) -> m FieldValue -> m Encoding
- reshapeAnnRelationSelect :: MonadError QErr m => (Fields (fieldType (UnpreparedValue 'DataConnector)) -> QueryResponse -> m Encoding) -> AnnRelationSelectG 'DataConnector (AnnSelectG 'DataConnector fieldType (UnpreparedValue 'DataConnector)) -> FieldValue -> m Encoding
Documentation
QueryPlan | |
|
data FieldsAndAggregates Source #
FieldsAndAggregates | |
|
newtype FieldPrefix Source #
prefixWith :: FieldName -> FieldPrefix Source #
applyPrefix :: FieldPrefix -> FieldName -> FieldName Source #
renderQuery :: QueryRequest -> Text Source #
Extract the Q
from a Plan
and render it as Text
.
NOTE: This is for logging and debug purposes only.
mkPlan :: forall m. MonadError QErr m => SessionVariables -> SourceConfig -> QueryDB 'DataConnector Void (UnpreparedValue 'DataConnector) -> m QueryPlan Source #
Map a 'QueryDB DataConnector
term into a Plan
queryHasRelations :: QueryRequest -> Bool Source #
Validate if a Q
contains any relationships.
data Cardinality Source #
reshapeResponseToQueryShape :: MonadError QErr m => QueryDB 'DataConnector Void (UnpreparedValue 'DataConnector) -> QueryResponse -> m Encoding Source #
reshapeSimpleSelectRows :: MonadError QErr m => Cardinality -> AnnFieldsG 'DataConnector Void (UnpreparedValue 'DataConnector) -> QueryResponse -> m Encoding Source #
reshapeTableAggregateFields :: MonadError QErr m => TableAggregateFieldsG 'DataConnector Void (UnpreparedValue 'DataConnector) -> QueryResponse -> m Encoding Source #
reshapeAggregateFields :: MonadError QErr m => FieldPrefix -> AggregateFields 'DataConnector -> KeyMap Value -> m Encoding Source #
reshapeAnnFields :: MonadError QErr m => FieldPrefix -> AnnFieldsG 'DataConnector Void (UnpreparedValue 'DataConnector) -> KeyMap FieldValue -> m Encoding Source #
encodeAssocListAsObject :: [(Text, Encoding)] -> Encoding Source #
reshapeField :: MonadError QErr m => AnnFieldG 'DataConnector Void (UnpreparedValue 'DataConnector) -> m FieldValue -> m Encoding Source #
reshapeAnnRelationSelect :: MonadError QErr m => (Fields (fieldType (UnpreparedValue 'DataConnector)) -> QueryResponse -> m Encoding) -> AnnRelationSelectG 'DataConnector (AnnSelectG 'DataConnector fieldType (UnpreparedValue 'DataConnector)) -> FieldValue -> m Encoding Source #