Hoogle Search

Within LTS Haskell 24.66 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. SideData :: DistinctClause -> [FromClause] -> [SetClause] -> WhereClause -> GroupByClause -> HavingClause -> [OrderByClause] -> LimitClause -> LockingClause -> [CommonTableExpressionClause] -> SideData

    esqueleto Database.Esqueleto.Internal.Internal

    No documentation available.

  2. class ToBaseId ent

    esqueleto Database.Esqueleto.Internal.Internal

    Class that enables one to use toBaseId to convert an entity's key on a query into another (cf. toBaseId).

  3. aliasedEntityColumnIdent :: Ident -> FieldDef -> Ident

    esqueleto Database.Esqueleto.Internal.Internal

    No documentation available.

  4. collectIdents :: FromClause -> Set Ident

    esqueleto Database.Esqueleto.Internal.Internal

    No documentation available.

  5. fromBaseId :: ToBaseId ent => SqlExpr (Value (Key (BaseEnt ent))) -> SqlExpr (Value (Key ent))

    esqueleto Database.Esqueleto.Internal.Internal

    The inverse of toBaseId. Note that this is somewhat less "safe" than toBaseId. Calling toBaseId will usually mean that a foreign key constraint is present that guarantees the presence of the base ID. fromBaseId has no such guarantee. Consider the code example given in toBaseId:

    Bar
    barNum Int
    Foo
    bar BarId
    fooNum Int
    Primary bar
    
    instance ToBaseId Foo where
    type BaseEnt Foo = Bar
    toBaseIdWitness barId = FooKey barId
    
    The type of toBaseId for Foo would be:
    toBaseId :: SqlExpr (Value FooId) -> SqlExpr (Value BarId)
    
    The foreign key constraint on Foo means that every FooId points to a BarId in the database. However, fromBaseId will not have this:
    fromBaseId :: SqlExpr (Value BarId) -> SqlExpr (Value FooId)
    

  6. fromBaseIdMaybe :: ToBaseId ent => SqlExpr (Value (Maybe (Key (BaseEnt ent)))) -> SqlExpr (Value (Maybe (Key ent)))

    esqueleto Database.Esqueleto.Internal.Internal

    As fromBaseId, but works on Maybe keys.

  7. initialIdentState :: IdentState

    esqueleto Database.Esqueleto.Internal.Internal

    No documentation available.

  8. newIdentFor :: DBName -> SqlQuery Ident

    esqueleto Database.Esqueleto.Internal.Internal

    Create a fresh Ident. If possible, use the given DBName.

  9. toBaseId :: ToBaseId ent => SqlExpr (Value (Key ent)) -> SqlExpr (Value (Key (BaseEnt ent)))

    esqueleto Database.Esqueleto.Internal.Internal

    Convert an entity's key into another entity's. This function is to be used when you change an entity's Id to be that of another entity. For example:

    Bar
    barNum Int
    Foo
    bar BarId
    fooNum Int
    Primary bar
    
    In this example, Bar is said to be the BaseEnt(ity), and Foo the child. To model this in Esqueleto, declare:
    instance ToBaseId Foo where
    type BaseEnt Foo = Bar
    toBaseIdWitness barId = FooKey barId
    
    Now you're able to write queries such as:
    select $
    from $ (bar `InnerJoin` foo) -> do
    on (toBaseId (foo ^. FooId) ==. bar ^. BarId)
    return (bar, foo)
    
    Note: this function may be unsafe to use in conditions not like the one of the example above.

  10. toBaseIdMaybe :: ToBaseId ent => SqlExpr (Value (Maybe (Key ent))) -> SqlExpr (Value (Maybe (Key (BaseEnt ent))))

    esqueleto Database.Esqueleto.Internal.Internal

    Like toBaseId, but works on Maybe keys.

Page 958 of many | Previous | Next