Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
MSSQL Plan
Planning T-SQL queries and subscription by translating IR to MSSQL-specific SQL query types.
Synopsis
- planQuery :: MonadError QErr m => SessionVariables -> QueryDB 'MSSQL Void (UnpreparedValue 'MSSQL) -> m (QueryWithDDL Select)
- planSourceRelationship :: MonadError QErr m => SessionVariables -> NonEmpty Object -> HashMap FieldName (ColumnName, ScalarType) -> FieldName -> (FieldName, SourceRelationshipSelection 'MSSQL Void UnpreparedValue) -> m Select
- prepareValueQuery :: MonadError QErr m => SessionVariables -> UnpreparedValue 'MSSQL -> m Expression
- planSubscription :: MonadError QErr m => InsOrdHashMap Name (QueryDB 'MSSQL Void (UnpreparedValue 'MSSQL)) -> SessionVariables -> m (Reselect, PrepareState)
- data PrepareState = PrepareState {}
- resultIdAlias :: Text
- resultVarsAlias :: Text
- resultAlias :: Text
- rowAlias :: Text
Documentation
planQuery :: MonadError QErr m => SessionVariables -> QueryDB 'MSSQL Void (UnpreparedValue 'MSSQL) -> m (QueryWithDDL Select) Source #
planSourceRelationship Source #
:: MonadError QErr m | |
=> SessionVariables | |
-> NonEmpty Object | List of json objects, each of which becomes a row of the table |
-> HashMap FieldName (ColumnName, ScalarType) | The above objects have this schema |
-> FieldName | |
-> (FieldName, SourceRelationshipSelection 'MSSQL Void UnpreparedValue) | |
-> m Select |
For more information, see the module/documentation of Source
.
prepareValueQuery :: MonadError QErr m => SessionVariables -> UnpreparedValue 'MSSQL -> m Expression Source #
Prepare a value without any query planning; we just execute the query with the values embedded.
planSubscription :: MonadError QErr m => InsOrdHashMap Name (QueryDB 'MSSQL Void (UnpreparedValue 'MSSQL)) -> SessionVariables -> m (Reselect, PrepareState) Source #
data PrepareState Source #
resultIdAlias :: Text Source #
resultAlias :: Text Source #