1module ProjectM36.DatabaseContextFunctionUtils where
2import ProjectM36.RelationalExpression
4import ProjectM36.DatabaseContextFunctionError
6import Control.Monad.State
7import Control.Monad.Trans.Reader
9executeDatabaseContextExpr :: DatabaseContextExpr -> DatabaseContext -> Either DatabaseContextFunctionError DatabaseContext
10executeDatabaseContextExpr expr context = case runState (evalDatabaseContextExpr expr) (freshDatabaseState context) of
11 (Nothing, (context', _, _)) -> pure context'
12 (Just err, _) -> error (show err)
14executeRelationalExpr :: RelationalExpr -> DatabaseContext -> Either RelationalError Relation
15executeRelationalExpr expr context = runReader (evalRelationalExpr expr) (mkRelationalExprState context)
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list