Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
Abstract Syntax Tree of yesod-dsl definition.
- data Module = Module {
- modName :: Maybe String
- modEntities :: [Entity]
- modClasses :: [Class]
- modEnums :: [EnumType]
- modRoutes :: [Route]
- modDefines :: [Define]
- moduleName :: Module -> String
- emptyModule :: Module
- type ClassName = String
- type ParamName = String
- type EntityName = String
- type EnumName = String
- data FieldType
- data Location = Loc FilePath Int Int
- data Define = Define {}
- data DefineContent = DefineSubQuery SelectQuery
- type FieldName = String
- data Unique = Unique {
- uniqueName :: String
- uniqueFields :: [FieldName]
- data HandlerType
- type VariableName = String
- data JoinType
- isOuterJoin :: JoinType -> Bool
- data BinOp
- data ValBinOp
- data BoolExpr
- data ValExpr
- data Type
- data HandlerParam
- = Public
- | DefaultFilterSort
- | Select SelectQuery
- | IfFilter IfFilterParams
- | DeleteFrom EntityName VariableName (Maybe BoolExpr)
- | GetById EntityName InputFieldRef VariableName
- | Update EntityName InputFieldRef (Maybe [InputField])
- | Insert EntityName (Maybe [InputField]) (Maybe VariableName)
- | Return [OutputField]
- | Require SelectQuery
- | For VariableName InputFieldRef [HandlerParam]
- | Call FunctionName [(InputFieldRef, Maybe Type)]
- type UseParamFlag = Bool
- type IfFilterParams = (ParamName, [Join], BoolExpr, UseParamFlag)
- data SelectQuery = SelectQuery {
- sqFields :: [SelectField]
- sqFrom :: (EntityName, VariableName)
- sqJoins :: [Join]
- sqWhere :: Maybe BoolExpr
- sqOrderBy :: [(FieldRef, SortDir)]
- sqLimitOffset :: (Int, Int)
- type MaybeFlag = Bool
- sqAliases :: SelectQuery -> [(EntityName, VariableName, MaybeFlag)]
- data SelectField
- data Join = Join {}
- type InputField = (ParamName, InputFieldRef)
- data CheckmarkValue
- data InputFieldRef
- type OutputField = (ParamName, OutputFieldRef)
- data OutputFieldRef = OutputFieldLocalParam VariableName
- data SortDir
- data Handler = Handler {}
- data Entity = Entity {
- entityLoc :: Location
- entityName :: String
- entityInstances :: [ClassName]
- entityFields :: [Field]
- entityClassFields :: [Field]
- entityUniques :: [Unique]
- entityDeriving :: [ClassName]
- entityChecks :: [FunctionName]
- data Route = Route {}
- routePathParams :: Route -> [PathPiece]
- isPathParam :: PathPiece -> Bool
- handlerName :: Route -> Handler -> String
- routeName :: [PathPiece] -> String
- data PathPiece
- data FieldRef
- entityFieldByName :: Entity -> FieldName -> Field
- data EnumType = EnumType {}
- data Class = Class {
- classLoc :: Location
- className :: String
- classFields :: [Field]
- classUniques :: [Unique]
- type DefaultValue = String
- type IsListFlag = Bool
- data FieldContent
- data Field = Field {}
- type FunctionName = String
- data FieldOption
- data FieldValue
- fieldValueToSql :: FieldValue -> String
- fieldValueToEsqueleto :: FieldValue -> String
- fieldValueToHs :: FieldValue -> String
- fieldOptions :: Field -> [FieldOption]
- fieldDefault :: Field -> Maybe FieldValue
- fieldChecks :: Field -> [FunctionName]
- lookupEntity :: Module -> EntityName -> Maybe Entity
- lookupField :: Module -> EntityName -> FieldName -> Maybe Field
- lowerFirst :: String -> String
- upperFirst :: String -> String
Documentation
definitions in single file form a Module
Module | |
|
moduleName :: Module -> String Source
safe function to extract Module
name
type EntityName = String Source
file name, row number, and column
macro definition, currently used only to define parametrized sub-select-queries
Define | |
|
data DefineContent Source
macro-like definition, currently only for commonly used parametrized sub-queries
Unique | |
|
data HandlerType Source
type VariableName = String Source
isOuterJoin :: JoinType -> Bool Source
data HandlerParam Source
type UseParamFlag = Bool Source
type IfFilterParams = (ParamName, [Join], BoolExpr, UseParamFlag) Source
data SelectQuery Source
SelectQuery | |
|
sqAliases :: SelectQuery -> [(EntityName, VariableName, MaybeFlag)] Source
data SelectField Source
Join | |
|
type InputField = (ParamName, InputFieldRef) Source
data CheckmarkValue Source
data InputFieldRef Source
type OutputField = (ParamName, OutputFieldRef) Source
data OutputFieldRef Source
Entity | |
|
routePathParams :: Route -> [PathPiece] Source
isPathParam :: PathPiece -> Bool Source
handlerName :: Route -> Handler -> String Source
entityFieldByName :: Entity -> FieldName -> Field Source
Class | |
|
type DefaultValue = String Source
type IsListFlag = Bool Source
data FieldContent Source
Field | |
|
type FunctionName = String Source
data FieldOption Source
data FieldValue Source
fieldValueToHs :: FieldValue -> String Source
fieldOptions :: Field -> [FieldOption] Source
fieldDefault :: Field -> Maybe FieldValue Source
fieldChecks :: Field -> [FunctionName] Source
lookupEntity :: Module -> EntityName -> Maybe Entity Source
lookupField :: Module -> EntityName -> FieldName -> Maybe Field Source
lowerFirst :: String -> String Source
upperFirst :: String -> String Source