March Docs

Build

depot/lib/build.march Pipe-friendly query builder functions.

Usage: from("users") |> select([Col("name"), Col("email")]) |> where_(Eq(Col("age"), Lit(PInt(18)))) |> order_by(Col("name"), Asc) |> limit(10)

Functions

fnas_count_queryas_count_query(q)#
fnconcat_exprsconcat_exprs(xs, ys)#
fnconcat_joinsconcat_joins(xs, ys)#
fnconcat_ordersconcat_orders(xs, ys)#
fnconcat_selectsconcat_selects(xs, ys)#
fnconcat_wheresconcat_wheres(xs, ys)#
fncross_joincross_join(q, table)#
fndistinctdistinct(q)#
fndistinct_ondistinct_on(q, exprs)#
fnfragmentfragment(q, template, args)#
fnfromfrom(table)#
fnfrom_subqueryfrom_subquery(subq, alias_name)#
fnfull_joinfull_join(q, table, on_expr)#
fngroup_bygroup_by(q, exprs)#
fnhavinghaving(q, expr)#
fnjoinjoin(q, table, on_expr)#
fnleft_joinleft_join(q, table, on_expr)#
fnlimitlimit(q, n)#
fnnot_deletednot_deleted(q)#
fnoffsetoffset(q, n)#
fnor_whereor_where(q, expr)#
fnorder_ascorder_asc(q, expr) do order_by(q, expr, Ast.Asc) end#
fnorder_byorder_by(q, expr, dir)#
fnorder_descorder_desc(q, expr) do order_by(q, expr, Ast.Desc) end#
fnright_joinright_join(q, table, on_expr)#
fnselectselect(q, exprs)#
fnselect_allselect_all(q)#
fnselect_asselect_as(q, expr, alias_name)#
fnselect_colselect_col(q, col_name)#
fnwhere_where_(q, expr)#
fnwhere_betweenwhere_between(q, expr, lo, hi)#
fnwhere_existswhere_exists(q, subq)#
fnwhere_inwhere_in(q, expr, vals)#
fnwhere_in_subquerywhere_in_subquery(q, col_name, subq)#
fnwhere_not_existswhere_not_exists(q, subq)#
fnwhere_not_inwhere_not_in(q, expr, vals)#
fnwhere_orwhere_or(q, exprs)#
fnwith_deletedwith_deleted(q)#