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. toBaseId :: ToBaseId ent => SqlExpr (Value (Key ent)) -> SqlExpr (Value (Key (BaseEnt ent)))

    esqueleto Database.Esqueleto

    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.

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

    esqueleto Database.Esqueleto

    Like toBaseId, but works on Maybe keys.

  3. toBaseIdWitness :: ToBaseId ent => Key (BaseEnt ent) -> Key ent

    esqueleto Database.Esqueleto

    Convert from the key of the BaseEnt(ity) to the key of the child entity. This function is not actually called, but that it typechecks proves this operation is safe.

  4. data BackendSpecificOverrides

    esqueleto Database.Esqueleto.Experimental

    Record of functions to override the default behavior in mkColumns. It is recommended you initialize this with emptyBackendSpecificOverrides and override the default values, so that as new fields are added, your code still compiles. For added safety, use the getBackendSpecific* and setBackendSpecific* functions, as a breaking change to the record field labels won't be reflected in a major version bump of the library.

  5. Divide :: PersistUpdate

    esqueleto Database.Esqueleto.Experimental

    No documentation available.

  6. data EntityIdDef

    esqueleto Database.Esqueleto.Experimental

    The definition for the entity's primary key ID.

  7. EntityIdField :: FieldDef -> EntityIdDef

    esqueleto Database.Esqueleto.Experimental

    The entity has a single key column, and it is a surrogate key - that is, you can't go from rec -> Key rec.

  8. EntityIdNaturalKey :: CompositeDef -> EntityIdDef

    esqueleto Database.Esqueleto.Experimental

    The entity has a natural key. This means you can write rec -> Key rec because all the key fields are present on the datatype. A natural key can have one or more columns.

  9. PersistInvalidField :: Text -> PersistException

    esqueleto Database.Esqueleto.Experimental

    No documentation available.

  10. PersistObjectId :: ByteString -> PersistValue

    esqueleto Database.Esqueleto.Experimental

    Intended especially for MongoDB backend

Page 955 of many | Previous | Next