Hoogle Search

Within LTS Haskell 24.3 (ghc-9.10.2)

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

  1. UnsafeValue :: forall a typ . PersistField a => a -> FilterValue typ

    esqueleto Database.Esqueleto

    No documentation available.

  2. entityVal :: Entity record -> record

    esqueleto Database.Esqueleto

    No documentation available.

  3. entityValues :: PersistEntity record => Entity record -> [PersistValue]

    esqueleto Database.Esqueleto

    Get list of values corresponding to given entity.

  4. filterClauseWithVals :: PersistEntity val => Maybe FilterTablePrefix -> SqlBackend -> [Filter val] -> (Text, [PersistValue])

    esqueleto Database.Esqueleto

    Render a [Filter record] into a Text value suitable for inclusion into a SQL query, as well as the [PersistValue] to properly fill in the ? place holders.

  5. fromPersistValue :: PersistField a => PersistValue -> Either Text a

    esqueleto Database.Esqueleto

    No documentation available.

  6. fromPersistValueJSON :: FromJSON a => PersistValue -> Either Text a

    esqueleto Database.Esqueleto

    Convenience function for getting a free PersistField instance from a type with JSON instances. The JSON parser used will accept JSON values other that object and arrays. So, if your instance serializes the data to a JSON string, this will still work. Example usage in combination with toPersistValueJSON:

    instance PersistField MyData where
    fromPersistValue = fromPersistValueJSON
    toPersistValue = toPersistValueJSON
    

  7. fromPersistValueText :: PersistValue -> Either Text Text

    esqueleto Database.Esqueleto

    No documentation available.

  8. fromPersistValues :: PersistEntity record => [PersistValue] -> Either Text record

    esqueleto Database.Esqueleto

    A lower-level operation to convert from database values to a Haskell record.

  9. getByValue :: forall record (m :: Type -> Type) backend . (MonadIO m, PersistUniqueRead backend, PersistRecordBackend record backend, AtLeastOneUniqueKey record) => record -> ReaderT backend m (Maybe (Entity record))

    esqueleto Database.Esqueleto

    A modification of getBy, which takes the PersistEntity itself instead of a Unique record. Returns a record matching one of the unique keys. This function makes the most sense on entities with a single Unique constructor.

    Example usage

    With schema-1 and dataset-1, getBySpjValue :: MonadIO m => ReaderT SqlBackend m (Maybe (Entity User)) getBySpjValue = getByValue $ User SPJ 999
    mSpjEnt <- getBySpjValue
    
    The above query when applied on dataset-1, will get this record:
    +----+------+-----+
    | id | name | age |
    +----+------+-----+
    |  1 | SPJ  |  40 |
    +----+------+-----+
    

  10. keyFromValues :: PersistEntity record => [PersistValue] -> Either Text (Key record)

    esqueleto Database.Esqueleto

    A lower-level key operation.

Page 5 of many | Previous | Next