o١b      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`aNone0%(Internal) Class that implements the JOIN H magic  (see ). +(Internal) Class that implements the tuple H magic (see  ). Phantom type for a SET% operation on an entity of the given  type (see B and '(=.)'). Phantom type used by #, $ and %. ((Internal) Phantom type used to process H (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: H. Data type that represents a  CROSS JOIN (see  for an example). Data type that represents an  INNER JOIN (see  for an example). <A single value (as opposed to a whole entity). You may use  (*) or (+) to get a  from an b. "Finally tagless representation of  esqueleto's EDSL. (Internal) Start a H query with an entity. H  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  . #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. )Execute a subquery SELECT DISTINCT in an expression. *Project a field of an entity. +/Project a field of an entity that may be null. ,6Lift a constant value from Haskell-land to the query. -IS NULL comparison. . Analogous to c, promotes a value of type typ into  one of type  Maybe typ. It should hold that  val . Just  === just . val. /NULL value. 0COUNT(*) value. >LIKE operator. ? The string ?. May be useful while using > and  concatenation (@ or A, depending on your ; database). Note that you always to type the parenthesis,  for example:   name ``'like'`` (%) ++. val John ++. (%) @The CONCAT$ function with a variable number of 1 parameters. Supported by MySQL and PostgreSQL. AThe ||, string concatenation operator (named after  Haskell's d% in order to avoid naming clash with 9). % Supported by SQLite and PostgreSQL. BSET 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. HFROM$ 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. bef  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHghijklmnopqrstuvwxyz{|}I  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHI !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGH   'ef  + !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHghijklmnopqrstuvwxyz{|}None&I1(Internal) Class for mapping results coming from R  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. J,(Internal) Mode of query being converted by `. P"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 complete WHERE clause.  A part of a SET clause.  A part of a FROM clause. Side data written by R. QConstraint synonym for  persistent entities whose backend  is . RSQL 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. S1(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. T3(Internal) A raw SQL value. The same warning from  S# applies to this function as well. U=(Internal) A raw SQL function. Once again, the same warning  from S# applies to this function as well. V(Internal) Coerce a type of a 'SqlExpr (Value a)' into  another 'SqlExpr (Value b)'. You should not use this " function unless you know what you' re doing! W(Internal) Execute an  esqueleto SELECT R inside   persistent's  monad. X Execute an  esqueleto SELECT query inside  persistent's   monad and return a  of rows. Y Execute an  esqueleto SELECT query inside  persistent's  " monad and return a list of rows. We' ve seen that H% has some magic about which kinds of ( things you may bring into scope. This Y 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 (b 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 (*) and (+)) or to return any other ' value calculated on the query (e.g., 0 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). Z Execute an  esqueleto SELECT DISTINCT query inside   persistent's  monad and return a  of  rows. [ Execute an  esqueleto SELECT DISTINCT query inside   persistent's " monad and return a list of rows. \(Internal) Run a  of rows. ](Internal) Execute an  esqueleto statement inside   persistent's  monad. ^ 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 Y!, there is a useful way of using ^ 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 () _ 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) `(Internal) Pretty prints a R 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 Y query. <You may return any single value (i.e. a single column) from  a Y query. You may return a possibly-NULL b from a Y query. You may return an b from a Y query. Not useful for Y, but used for _ and ^. yI~JKLMNOPQRSTUVWXYZ[\]^_`IJKLMNOPQRSTUVWXYZ[\]^_`RPQYX[Z^_STUOW\]`JNMLKIVUI~JNMLKOPQRSTUVWXYZ[\]^_`Nonea Synonym for  that does not  clash with  esqueleto's ^. a      !"#$%&'()*+,-./0123456789:;<=>?@bABCDEFGHIJKLMNOPQRSTUVWXYZ[\]!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHPQRXYZ[^_aB!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHRPQY[XZ^_aa^       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdbefghijklmnopqrstuvwxyz{|}~_`____`_`[________________________`_`_`_`_`_`_`_`_`_` _` _` _` _` _`_`_`_`_`_`_`_`_`_`_`_`_`_`_`_`_`_`_`_` _`!_`"_`#_`$_`%_`&_`'_`(_`)_`*_`+_`,_`-_`._`/_`0_`1_`2_`3_`4_`5_`6_`7_`8_`9_`:_`;_`;_`<_`=_`=_`>_`?_`a_`@_`A_`B_`C_`D_`E_`F_`G_`H_`I_`J_`K_`L_`M_`N_`O_`P_`Q_`R_`S_`T_`U_`V_`W_`X_`Y_`Z_`[_`\]esqueleto-0.2.7$Database.Esqueleto.Internal.LanguageDatabase.Esqueleto.Internal.SqlDatabase.EsqueletoFromPreprocessFromUpdateOrderByPreprocessedFrom$OnClauseWithoutMatchingJoinException IsJoinKind smartJoin reifyJoinKindJoinKindFullOuterJoinKindRightOuterJoinKindLeftOuterJoinKind CrossJoinKind InnerJoinKind FullOuterJoinRightOuterJoin LeftOuterJoin CrossJoin InnerJoinValue Esqueleto fromStartfromStartMaybefromJoin fromFinishwhere_onorderByascdesclimitoffset sub_selectsub_selectDistinct^.?.val isNothingjustnothing countRowsnot_==.>=.>.<=.<.!=.&&.||.+.-./.*.like%concat_++.set=.+=.-=.*=./=.from SqlSelectModeUPDATEDELETESELECT_DISTINCTSELECTUnsafeSqlFunctionArgumentSqlExpr SqlEntitySqlQueryunsafeSqlBinOpunsafeSqlValueunsafeSqlFunctionveryUnsafeCoerceSqlExprValuerawSelectSource selectSourceselectselectDistinctSourceselectDistinct runSource rawExecutedeleteupdatetoRawSql deleteKeypersistent-1.0.1.1Database.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 sqlSelectCols PersistValueDatabase.Persist.GenericSql.RawwithStmtsqlSelectColCountsqlSelectProcessRow IdentStateIdent LimitClause OrderByClause WhereClause SetClause FromClauseSideData SqlPersistcollectOnClausesOnClauseFromJoin newIdentForDatabase.Persist.EntityDefDBNameuseIdentconduit-0.5.2.4Data.Conduit.InternalSource PersistField$fSqlSelect(,)(,)$fSqlSelectSqlExprValue$fSqlSelectSqlExprMaybe$fSqlSelectSqlExprEntity$fSqlSelect()() toArgList OrderByTypeDESCASC NeedParensNeverParensEPreprocessedFromESetEOrderByERawEMaybeEEntityinUseILimitNoWhereWhere FromStart sdFromClause sdSetClause sdWhereClausesdOrderByClause sdLimitClauseQunQinitialIdentStateparensM fieldNamesetAuxsub fromDBName builderToTextuncommas uncommas' makeSelectmakeFrommakeSet makeWhere makeOrderBy makeLimitparens getEntityValfrom3to3from4to4from5to5from6to6from7to7from8to8$fSqlSelect(,,,,,,,)(,,,,,,,)$fSqlSelect(,,,,,,)(,,,,,,)$fSqlSelect(,,,,,)(,,,,,)$fSqlSelect(,,,,)(,,,,)$fSqlSelect(,,,)(,,,)$fSqlSelect(,,)(,,) $fUnsafeSqlFunctionArgument(,,,)$fUnsafeSqlFunctionArgument(,,)$fUnsafeSqlFunctionArgument(,)$fUnsafeSqlFunctionArgument[]"$fUnsafeSqlFunctionArgumentSqlExpr$$fEsqueletoSqlQuerySqlExprSqlPersist$fMonoidLimitClause$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