Skuld.Query (skuld_query v0.32.2)
View SourceSyntax module providing the query do-notation macro.
Part of the skuld_query package, which provides Haxl-style auto-batching
data fetches via dependency analysis and concurrent FiberPool dispatch.
See the architecture guide
for how this fits into the Skuld ecosystem.
use Skuld.Query imports query, defquery, and defqueryp macros
for writing batchable data-fetching computations.
Usage
use Skuld.Query
query do
user <- Users.get_user(id)
orders <- Orders.get_by_user(user.id)
{user, orders}
end
defquery user_with_orders(id) do
user <- Users.get_user(id)
orders <- Orders.get_by_user(user.id)
{user, orders}
endSee Also
Skuld.QueryContract— define batchable fetch contracts withdeffetchSkuld.Syntax— computation block macros (comp,defcomp)