Hoogle Search
Within LTS Haskell 22.42 (ghc-9.6.6)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
from :: From a => (a -> SqlQuery b) -> SqlQuery besqueleto Database.Esqueleto FROM clause: bring entities into scope. Note that this function will be replaced by the one in Database.Esqueleto.Experimental in version 4.0.0.0 of the library. The Experimental module has a dramatically improved means for introducing tables and entities that provides more power and less potential for runtime errors. 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 JOIN of any other two types allowed by the innermost magic, where a JOIN may be an InnerJoin, a CrossJoin, a LeftOuterJoin, a RightOuterJoin, or a FullOuterJoin. The JOINs have left fixity.
from $ \person -> ... from $ \(person, blogPost) -> ... from $ \(p `LeftOuterJoin` mb) -> ... from $ \(p1 `InnerJoin` f `InnerJoin` p2) -> ... from $ \((p1 `InnerJoin` f) `InnerJoin` p2) -> ...
The 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 `LeftOuterJoin` mb) :: (...) => InnerJoin (expr (Entity Person)) (expr (Maybe (Entity BlogPost))) (p1 `InnerJoin` f `InnerJoin` p2) :: (...) => InnerJoin (InnerJoin (expr (Entity Person)) (expr (Entity Follow))) (expr (Entity Person)) (p1 `InnerJoin` (f `InnerJoin` p2)) :: :: (...) => InnerJoin (expr (Entity Person)) (InnerJoin (expr (Entity Follow)) (expr (Entity Person)))
Note that some backends may not support all kinds of JOINs.from :: ToFrom a a' => a -> SqlQuery a'esqueleto Database.Esqueleto.Experimental FROM clause, used to bring entities into scope. Internally, this function uses the From datatype. Unlike the old from, this does not take a function as a parameter, but rather a value that represents a JOIN tree constructed out of instances of From. This implementation eliminates certain types of runtime errors by preventing the construction of invalid SQL (e.g. illegal nested-from).
from :: ToFrom a a' => a -> SqlQuery a'esqueleto Database.Esqueleto.Experimental.From FROM clause, used to bring entities into scope. Internally, this function uses the From datatype. Unlike the old from, this does not take a function as a parameter, but rather a value that represents a JOIN tree constructed out of instances of From. This implementation eliminates certain types of runtime errors by preventing the construction of invalid SQL (e.g. illegal nested-from).
from :: From a => (a -> SqlQuery b) -> SqlQuery besqueleto Database.Esqueleto.Internal.Internal FROM clause: bring entities into scope. Note that this function will be replaced by the one in Database.Esqueleto.Experimental in version 4.0.0.0 of the library. The Experimental module has a dramatically improved means for introducing tables and entities that provides more power and less potential for runtime errors. 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 JOIN of any other two types allowed by the innermost magic, where a JOIN may be an InnerJoin, a CrossJoin, a LeftOuterJoin, a RightOuterJoin, or a FullOuterJoin. The JOINs have left fixity.
from $ \person -> ... from $ \(person, blogPost) -> ... from $ \(p `LeftOuterJoin` mb) -> ... from $ \(p1 `InnerJoin` f `InnerJoin` p2) -> ... from $ \((p1 `InnerJoin` f) `InnerJoin` p2) -> ...
The 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 `LeftOuterJoin` mb) :: (...) => InnerJoin (expr (Entity Person)) (expr (Maybe (Entity BlogPost))) (p1 `InnerJoin` f `InnerJoin` p2) :: (...) => InnerJoin (InnerJoin (expr (Entity Person)) (expr (Entity Follow))) (expr (Entity Person)) (p1 `InnerJoin` (f `InnerJoin` p2)) :: :: (...) => InnerJoin (expr (Entity Person)) (InnerJoin (expr (Entity Follow)) (expr (Entity Person)))
Note that some backends may not support all kinds of JOINs.from :: From a => (a -> SqlQuery b) -> SqlQuery besqueleto Database.Esqueleto.Legacy FROM clause: bring entities into scope. Note that this function will be replaced by the one in Database.Esqueleto.Experimental in version 4.0.0.0 of the library. The Experimental module has a dramatically improved means for introducing tables and entities that provides more power and less potential for runtime errors. 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 JOIN of any other two types allowed by the innermost magic, where a JOIN may be an InnerJoin, a CrossJoin, a LeftOuterJoin, a RightOuterJoin, or a FullOuterJoin. The JOINs have left fixity.
from $ \person -> ... from $ \(person, blogPost) -> ... from $ \(p `LeftOuterJoin` mb) -> ... from $ \(p1 `InnerJoin` f `InnerJoin` p2) -> ... from $ \((p1 `InnerJoin` f) `InnerJoin` p2) -> ...
The 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 `LeftOuterJoin` mb) :: (...) => InnerJoin (expr (Entity Person)) (expr (Maybe (Entity BlogPost))) (p1 `InnerJoin` f `InnerJoin` p2) :: (...) => InnerJoin (InnerJoin (expr (Entity Person)) (expr (Entity Follow))) (expr (Entity Person)) (p1 `InnerJoin` (f `InnerJoin` p2)) :: :: (...) => InnerJoin (expr (Entity Person)) (InnerJoin (expr (Entity Follow)) (expr (Entity Person)))
Note that some backends may not support all kinds of JOINs.-
esqueleto Database.Esqueleto (Internal) Class that implements the tuple from magic (see fromStart).
-
esqueleto Database.Esqueleto.Experimental Data type defining the From language. This should not constructed directly in application code. A From is a SqlQuery which returns a reference to the result of calling from and a function that produces a portion of a FROM clause. This gets passed to the FromRaw FromClause constructor directly when converting from a From to a SqlQuery using from
From :: SqlQuery (a, RawFn) -> From aesqueleto Database.Esqueleto.Experimental No documentation available.
module Database.Esqueleto.Experimental.
From No documentation available.
-
esqueleto Database.Esqueleto.Experimental.From Data type defining the From language. This should not constructed directly in application code. A From is a SqlQuery which returns a reference to the result of calling from and a function that produces a portion of a FROM clause. This gets passed to the FromRaw FromClause constructor directly when converting from a From to a SqlQuery using from
Page 1 of many | Next