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.
UnsafeValue :: forall a typ . PersistField a => a -> FilterValue typesqueleto Database.Esqueleto No documentation available.
entityVal :: Entity record -> recordesqueleto Database.Esqueleto No documentation available.
entityValues :: PersistEntity record => Entity record -> [PersistValue]esqueleto Database.Esqueleto Get list of values corresponding to given entity.
-
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.
fromPersistValue :: PersistField a => PersistValue -> Either Text aesqueleto Database.Esqueleto No documentation available.
fromPersistValueJSON :: FromJSON a => PersistValue -> Either Text aesqueleto 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
fromPersistValueText :: PersistValue -> Either Text Textesqueleto Database.Esqueleto No documentation available.
fromPersistValues :: PersistEntity record => [PersistValue] -> Either Text recordesqueleto Database.Esqueleto A lower-level operation to convert from database values to a Haskell 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 999mSpjEnt <- getBySpjValue
The above query when applied on dataset-1, will get this record:+----+------+-----+ | id | name | age | +----+------+-----+ | 1 | SPJ | 40 | +----+------+-----+
keyFromValues :: PersistEntity record => [PersistValue] -> Either Text (Key record)esqueleto Database.Esqueleto A lower-level key operation.