op      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnoNone;%(Internal) Class that implements the JOIN V magic  (see #). +(Internal) Class that implements the tuple V magic (see  #). Phantom type for a SET% operation on an entity of the given  type (see P and '(=.)'). Phantom type used by *, + and ,. ((Internal) Phantom type used to process V (see #). Exception thrown whenever ( is used to create an ON  clause but no matching JOIN is found. <(Internal) Functions that operate on types (that should be)  of kind  .  (Internal)  smartJoin a b is a JOIN of the correct kind. (Internal) Reify a JoinKind from a JOIN. This  function is non-strict. (Internal) A kind of JOIN. FULL OUTER JOIN RIGHT OUTER JOIN LEFT OUTER JOIN  CROSS JOIN  INNER JOINData type that represents a FULL OUTER JOIN (see  for an example). Data type that represents a RIGHT OUTER JOIN (see  for an example). Data type that represents a LEFT OUTER JOIN. For example,    select $  from $ \(person `` pet) ->  ... is translated into    SELECT ... ! FROM Person LEFT OUTER JOIN Pet  ...  See also: V. Data type that represents a  CROSS JOIN (see  for an example). Data type that represents an  INNER JOIN (see  for an example). IA class of things that can be converted into a list of SomeValue. It has J instances for tuples and is the reason why groupBy can take tuples, like  6groupBy (foo ^. FooId, foo ^. FooName, foo ^. FooType). A wrapper type for for any expr (Value a) for all a. A list of single values. There's a limited set of funcitons + able to work with this data type (such as I,  K, L and N). <A single value (as opposed to a whole entity). You may use  (1) or (2) to get a   from an p. ""Finally tagless representation of  esqueleto's EDSL. #(Internal) Start a V query with an entity. V  does two kinds of magic using #, % and  &: 8 The simple but tedious magic of allowing tuples to be  used. & The more advanced magic of creating JOINs. The  JOIN1 is processed from right to left. The rightmost  entity of the JOIN is created with #. Each  JOIN( step is then translated into a call to %.  In the end, & is called to materialize the  JOIN. $(Internal) Same as #, but entity may be missing. %(Internal) Do a JOIN. &(Internal) Finish a JOIN. 'WHERE clause: restrict the query' s result. (ON clause: restrict the a JOIN's result. The ON  clause will be applied to the last JOIN that does not  have an ON clause yet. If there are no JOIN s without  ON! clauses (either because you didn' t do any JOIN, or  because all JOINs already have their own ON clauses), a  runtime exception  is  thrown. ON! clauses are optional when doing JOINs. %On the simple case of doing just one JOIN, for example    select $  from $ \(foo `` bar) -> do ) on (foo ^. FooId ==. bar ^. BarFooId)  ... there'2s no ambiguity and the rules above just mean that  you're allowed to call ( only once (as in SQL). If you  have many joins, then the (s are applied on the reverse  order that the JOINs appear. For example:    select $  from $ \(foo `` bar `` baz) -> do ) on (baz ^. BazId ==. bar ^. BarBazId) ) on (foo ^. FooId ==. bar ^. BarFooId)  ...  The order is reversed$ in order to improve composability.  For example, consider query1 and query2 below:    let query1 =  from $ \(foo `` bar) -> do / on (foo ^. FooId ==. bar ^. BarFooId)  query2 =  from $ \(mbaz `` quux) -> do ( return (mbaz ?. BazName, quux)  test1 = (,) <$> query1 <*> query2  test2 = flip (,) <$> query2 <*> query1 If the order was not reversed, then test2 would be  broken: query1's ( would refer to query2's  . )GROUP BY* clause. You can enclose multiple columns  in a tuple.    select $ from \(foo `` bar) -> do ) on (foo ^. FooBarId ==. bar ^. BarId) * groupBy (bar ^. BarId, bar ^. BarName) 4 return (bar ^. BarId, bar ^. BarName, countRows) >With groupBy you can sort by aggregate functions, like so (we  used let to restrict the more general 7 to  SqlExpr (Value Int) to avoid ambiguity):   r <- select $ from \(foo `` bar) -> do ) on (foo ^. FooBarId ==. bar ^. BarId)  groupBy $ bar ^. BarName  let countRows' = countRows  orderBy [asc countRows'] $ return (bar ^. BarName, countRows')  forM_ r $ \$((Value name), (Value count)) -> do  print name  print (count :: Int) *ORDER BY clause. See also + and ,. +-Ascending order of this field or expression. ,.Descending order of this field or expression. -LIMIT&. Limit the number of returned rows. .OFFSET. Usually used with -. /Execute a subquery SELECT in an expression. Returns a . simple value so should be used only when the SELECT query ' is guaranteed to return just one row. 0Same as / but using SELECT DISTINCT. 1Project a field of an entity. 2/Project a field of an entity that may be null. 36Lift a constant value from Haskell-land to the query. 4IS NULL comparison. 5 Analogous to q, promotes a value of type typ into  one of type  Maybe typ. It should hold that  val . Just  === just . val. 6NULL value. 7COUNT(*) value. ELIKE operator. F The string F. May be useful while using E and  concatenation (G or H, depending on your ; database). Note that you always to type the parenthesis,  for example:   name ``'like'`` (%) ++. val John ++. (%) GThe CONCAT$ function with a variable number of 1 parameters. Supported by MySQL and PostgreSQL. HThe ||, string concatenation operator (named after  Haskell's r% in order to avoid naming clash with @). % Supported by SQLite and PostgreSQL. IExecute a subquery SELECT in an expression. Returns a  list of values. JSame as sublist_select but using SELECT DISTINCT. K>Lift a list of constant value from Haskell-land to the query. LIN operator. MNOT IN operator. NEXISTS operator. For example:   select $  from $ p erson -> do  where_ $ exists $  from $ p ost -> do C where_ (post ^. BlogPostAuthorId ==. person ^. PersonId)  return person O NOT EXISTS operator. PSET clause used on UPDATEs. Note that while it's not ( a type error to use this function on a SELECT , it will + most certainly result in a runtime error. VFROM$ clause: bring entities into scope. ;This function internally uses two type classes in order to > provide some flexibility of how you may call it. Internally = we refer to these type classes as the two different magics. &The innermost magic allows you to use from with the  following types:  expr (Entity val)$, which brings a single entity into  scope.  expr (Maybe (Entity val)), which brings a single entity  that may be NULL into scope. Used for  OUTER JOINs.  A JOIN1 of any other two types allowed by the innermost  magic, where a JOIN may be an , a , a  , a , or a .  The JOINs( have right fixity, the same as in SQL. &The outermost magic allows you to use from on any tuples of @ types supported by innermost magic (and also tuples of tuples,  and so on), up to 8-tuples. Note that using from) for the same entity twice does work and % corresponds to a self-join. You don't even need to use two  different calls to from, you may use a JOIN or a tuple. ,The following are valid examples of uses of from (the types = of the arguments of the lambda are inside square brackets):    from $ \person -> ...  from $ \(person, blogPost) -> ...  from $ \(p `` mb) -> ...  from $ \(p1 `` f `` p2) -> ...  from $ \((p1 `` f) `` p2) -> ... 5The types of the arguments to the lambdas above are,  respectively:    person % :: ( Esqueleto query expr backend  , PersistEntity Person . , PersistEntityBackend Person ~ backend  ) => expr (Entity Person)  (person, blogPost) > :: (...) => (expr (Entity Person), expr (Entity BlogPost))  (p `` mb) Q :: (...) => InnerJoin (expr (Entity Person)) (expr (Maybe (Entity BlogPost)))  (p1 `` f `` p2)  :: (...) => InnerJoin ( (expr (Entity Person)) 3 (InnerJoin (expr (Entity Follow)) 4 (expr (Entity Person)))  ((p1 `` f) `` p2) ::  :: (...) => InnerJoin 3 (InnerJoin (expr (Entity Person)) 4 (expr (Entity Follow))) ( (expr (Entity Person)) 5Note that some backends may not support all kinds of JOINs. > For example, when using the SQL backend with SQLite, it will ? not accept the last example above (which is associated to the : left, instead of being to the right) and will not accept  s or s. wst  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVuvwxyz{|}~W  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVW"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUV !   1st   !"3#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVuvwxyz{|}~None(W1(Internal) Class for mapping results coming from `  into actual results. This looks very similar to RawSql, and it is! However, 7 there are some crucial differences and ultimately they're  different classes. !Creates the variable part of the SELECT query and  returns the list of s that will be given to  . 2Number of columns that will be consumed. Must be  non-strict on the argument. 2Transform a row of the result into the data type. X,(Internal) Mode of query being converted by n. ^"An expression on the SQL backend. ;List of identifiers already in use and supply of temporary  identifiers. !Identifier used for table names. A LIMIT clause. A ORDER BY clause. A GROUP BY clause.  A complete WHERE clause.  A part of a SET clause.  A part of a FROM clause. Side data written by `. _Constraint synonym for  persistent entities whose backend  is . `SQL backend for  esqueleto using . Collect s on s. Returns the first  unmatched )s data on error. Returns a list without   OnClauses on success. Create a fresh . If possible, use the given  . Use an identifier. a1(Internal) Create a custom binary operator. You should  not3 use this function directly since its type is very 9 general, you should always use it with an explicit type  signature. For example:   I (==.) :: SqlExpr (Value a) -> SqlExpr (Value a) -> SqlExpr (Value Bool)  (==.) = unsafeSqlBinOp  =  ?In the example above, we constraint the arguments to be of the < same type and constraint the result to be a boolean value. b3(Internal) A raw SQL value. The same warning from  a# applies to this function as well. c=(Internal) A raw SQL function. Once again, the same warning  from a# applies to this function as well. d(Internal) Coerce a value' s type from 'SqlExpr (Value a)' to  'SqlExpr (Value b)'. You should not use this function  unless you know what you' re doing! (Internal) Coerce a value' s type from 'SqlExpr (ValueList  a)' to 'SqlExpr (Value a)'. e(Internal) Execute an  esqueleto SELECT ` inside   persistent's  monad. f Execute an  esqueleto SELECT query inside  persistent's   monad and return a  of rows. g Execute an  esqueleto SELECT query inside  persistent's  " monad and return a list of rows. We' ve seen that V% has some magic about which kinds of ( things you may bring into scope. This g function also @ has some magic for which kinds of things you may bring back to  Haskell-land by using SqlQuery's return:  You may return a  SqlExpr (p v) for an entity v  (i.e., like the *$ in SQL), which is then returned to  Haskell-land as just Entity v.  You may return a SqlExpr (Maybe (Entity v)) for an entity  v that may be NULL, which is then returned to  Haskell-land as Maybe (Entity v) . Used for  OUTER JOINs.  You may return a  SqlExpr (  t) for a value t ! (i.e., a single column), where t is any instance of  ,, which is then returned to Haskell-land as  Value t. You may use Value to return projections of an  Entity (see (1) and (2)) or to return any other ' value calculated on the query (e.g., 7 or  /). The  SqlSelect a r( class has functional dependencies that * allow type information to flow both from a to r and ! vice-versa. This means that you'll almost never have to give  any type signatures for  esqueleto queries. For example, the  query select $ from $ \ p -> return p alone is ambiguous, but  in the context of    do ps < - select $  from $ \p ->  return p : liftIO $ mapM_ (putStrLn . personName . entityVal) ps &we are able to infer from that single personName . entityVal  function composition that the p inside the query is of type  SqlExpr (Entity Person). h Execute an  esqueleto SELECT DISTINCT query inside   persistent's  monad and return a  of  rows. i Execute an  esqueleto SELECT DISTINCT query inside   persistent's " monad and return a list of rows. j(Internal) Run a  of rows. k(Internal) Execute an  esqueleto statement inside   persistent's  monad. l Execute an  esqueleto DELETE query inside  persistent's  / monad. Note that currently there are no type 3 checks for statements that should not appear on a DELETE  query. Example of usage:    delete $  from $ \appointment -> ( where_ (appointment ^. AppointmentDate < . val now) Unlike g!, there is a useful way of using l that @ will lead to type ambiguities. If you want to delete all rows  (i.e., no ' clause), you'!ll have to use a type signature:   delete $  from $ \1(appointment :: SqlExpr (Entity Appointment)) ->  return () m Execute an  esqueleto UPDATE query inside  persistent's  / monad. Note that currently there are no type 3 checks for statements that should not appear on a UPDATE  query. Example of usage:   update $ p -> do = set p [ PersonAge =. just (val thisYear) -. p ^. PersonBorn ] " where_ $ isNull (p ^. PersonAge) n(Internal) Pretty prints a ` into a SQL query.  Note: if you'2re curious about the SQL query being generated by   esqueleto4, instead of manually using this function (which is > possible but tedious), you may just turn on query logging of   persistent. <You may return tuples (up to 8-tuples) and tuples of tuples  from a g query. <You may return any single value (i.e. a single column) from  a g query. You may return a possibly-NULL p from a g query. You may return an p from a g query. Not useful for g, but used for m and l. WXYZ[\]^_`abcdefghijklmnWXYZ[\]^_`abcdefghijklmn`^_gfihlmabc]ejknX\[ZYWd[WX\[ZY]^_`abcdefghijklmnNoneo Synonym for  that does not  clash with  esqueleto's l. o      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^p_`abcdefghijklmnopqrstuvwxyz{ !"'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUV^_`fghilmoL"'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUV !`^_gifhlmoo|       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopnqrstuvwxyz{|}~klkkkklklgkkkkk k k k k  k k k k k k k k k k kkkkklklklklkl kl!kl"kl#kl$kl%kl&kl'kl(kl)kl*kl+kl,kl,kl-kl.kl/kl0kl1kl2kl3kl4kl5kl6kl7kl8kl9kl:kl;kl<kl=kl>kl?kl@klAklBklCklDklEklFklGklHklIklJklKklLklMklNklOklPklQklRklSklTklUklVklWklWklXklYklYklZkl[klmkl\kl]kl^kl_kl`klaklbklckldkleklfklgklhklikljklkkllklmklnkloklpklqklrklskltkluklvklwklxyesqueleto-0.2.9$Database.Esqueleto.Internal.LanguageDatabase.Esqueleto.Internal.SqlDatabase.EsqueletoFromPreprocessFromUpdateOrderByPreprocessedFrom$OnClauseWithoutMatchingJoinException IsJoinKind smartJoin reifyJoinKindJoinKindFullOuterJoinKindRightOuterJoinKindLeftOuterJoinKind CrossJoinKind InnerJoinKind FullOuterJoinRightOuterJoin LeftOuterJoin CrossJoin InnerJoin ToSomeValues toSomeValues SomeValue ValueListValue Esqueleto fromStartfromStartMaybefromJoin fromFinishwhere_ongroupByorderByascdesclimitoffset sub_selectsub_selectDistinct^.?.val isNothingjustnothing countRowsnot_==.>=.>.<=.<.!=.&&.||.+.-./.*.like%concat_++.subList_selectsubList_selectDistinctvalListin_notInexists notExistsset=.+=.-=.*=./=.from SqlSelectModeUPDATEDELETESELECT_DISTINCTSELECTUnsafeSqlFunctionArgumentSqlExpr SqlEntitySqlQueryunsafeSqlBinOpunsafeSqlValueunsafeSqlFunctionveryUnsafeCoerceSqlExprValuerawSelectSource selectSourceselectselectDistinctSourceselectDistinct runSource rawExecutedeleteupdatetoRawSql deleteKeypersistent-1.0.2.2Database.Persist.StoreEntitybase Data.MaybeJustGHC.Base++fromPreprocessfrom_$$fFromPreprocessqueryexprbackendjoin$$fFromPreprocessqueryexprbackendexpr%$fFromPreprocessqueryexprbackendexpr0$fFromqueryexprbackend(,,,,,,,)$fFromqueryexprbackend(,,,,,,)$fFromqueryexprbackend(,,,,,)$fFromqueryexprbackend(,,,,)$fFromqueryexprbackend(,,,)$fFromqueryexprbackend(,,)$fFromqueryexprbackend(,)#$fFromqueryexprbackendFullOuterJoin$$fFromqueryexprbackendRightOuterJoin#$fFromqueryexprbackendLeftOuterJoin$fFromqueryexprbackendCrossJoin$fFromqueryexprbackendInnerJoin$fFromqueryexprbackendexpr$fFromqueryexprbackendexpr0/$fExceptionOnClauseWithoutMatchingJoinException$fIsJoinKindFullOuterJoin$fIsJoinKindRightOuterJoin$fIsJoinKindLeftOuterJoin$fIsJoinKindCrossJoin$fIsJoinKindInnerJoin$fToSomeValuesexpr(,,,,,,,)$fToSomeValuesexpr(,,,,,,)$fToSomeValuesexpr(,,,,,)$fToSomeValuesexpr(,,,,)$fToSomeValuesexpr(,,,)$fToSomeValuesexpr(,,)$fToSomeValuesexpr(,) sqlSelectCols PersistValueDatabase.Persist.GenericSql.RawwithStmtsqlSelectColCountsqlSelectProcessRow IdentStateIdent LimitClause OrderByClause GroupByClause WhereClause SetClause FromClauseSideData SqlPersistcollectOnClausesOnClauseFromJoin newIdentForDatabase.Persist.EntityDefDBNameuseIdent veryUnsafeCoerceSqlExprValueList conduit-0.5.5Data.Conduit.InternalSource PersistField$fSqlSelect(,)(,)$fSqlSelectSqlExprValue$fSqlSelectSqlExprMaybe$fSqlSelectSqlExprEntity$fSqlSelect()() toArgList OrderByTypeDESCASC NeedParensNeverParensEPreprocessedFromESetEOrderByEListERawEMaybeEEntityinUseILimitGroupByNoWhereWhere FromStart sdFromClause sdSetClause sdWhereClausesdGroupByClausesdOrderByClause sdLimitClauseQunQinitialIdentStateparensM fieldNamesetAuxsub fromDBName existsHelper builderToTextuncommas uncommas' makeSelectmakeFrommakeSet makeWhere makeGroupBy makeOrderBy makeLimitparens getEntityValfrom3to3from4to4from5to5from6to6from7to7from8to8$fSqlSelect(,,,,,,,)(,,,,,,,)$fSqlSelect(,,,,,,)(,,,,,,)$fSqlSelect(,,,,,)(,,,,,)$fSqlSelect(,,,,)(,,,,)$fSqlSelect(,,,)(,,,)$fSqlSelect(,,)(,,) $fUnsafeSqlFunctionArgument(,,,)$fUnsafeSqlFunctionArgument(,,)$fUnsafeSqlFunctionArgument(,)$fUnsafeSqlFunctionArgument[]"$fUnsafeSqlFunctionArgumentSqlExpr$fToSomeValuesSqlExprSqlExpr$$fEsqueletoSqlQuerySqlExprSqlPersist$fMonoidLimitClause$fMonoidGroupByClause$fMonoidWhereClause$fMonoidSideData$fApplicativeSqlQuery$fMonadSqlQuery$fFunctorSqlQueryDatabase.Persist.GenericSqlrawSql runSqlConn runSqlPoolConnectionPoolunSingleSingleRawSql%Database.Persist.GenericSql.MigrationrollbackcommitmigraterunMigrationUnsaferunMigrationSilent runMigration getMigrationprintMigrationparseMigration'parseMigration Migration unSqlPersist$Database.Persist.GenericSql.Internal Connection Statement mapToJSON listToJSON checkUniquegetJust belongsToJust belongsTo getByValueinsertBy getPersistMap PersistErrorPersistMarshalErrorPersistInvalidFieldPersistForeignConstraintUnmetPersistMongoDBErrorPersistMongoDBUnsupportedPersistExceptionZT PersistTextPersistByteString PersistInt64 PersistDouble PersistBool PersistDayPersistTimeOfDayPersistUTCTimePersistZonedTime PersistNull PersistList PersistMapPersistObjectId SqlStringSqlInt32SqlInt64SqlRealSqlBoolSqlDaySqlTime SqlDayTimeSqlDayTimeZonedSqlBlobSqlOtherSqlType isNullablesqlTypefromPersistValuetoPersistValuepersistIdFieldpersistUniqueKeyspersistUniqueToValuespersistUniqueToFieldNames halfDefinedfromPersistValuestoPersistFields entityDefpersistFieldDefUniquePersistEntityBackend EntityField PersistEntitySomePersistFieldunKeyKey entityVal entityKeygetreplacerepsert insertKeyinsert PersistStore insertUniquedeleteBygetBy PersistUniqueEqNeGtLtGeLeInNotInBackendSpecificFilter PersistFilter deleteCascade DeleteCascaderunPoolcreatePoolConfigapplyEnv loadConfigPersistConfigPoolPersistConfigBackend PersistConfig