Selecto (Selecto v0.1.0)

Documentation for Selecto, a query writer and report generator for Elixir/Ecto

TODO

having

json/embeds/arrays/maps?

 json:  tablen[field].somejsonkey tablen[field][index].somekey...

distinct

select into tuple or list instead of map more efficient? ability to add synthetic root, joins, filters, columns

union, union all, intersect, intersect all -- pass in lists of alternative filters -- allow multiple unions

limit, offset

subqueries

Mebbie: windows? CTEs? recursive? first, last?? as limit, reverse_order

ERROR CHECKS -- Has association by right name?

Link to this section Summary

Functions

Generate a selecto structure from this Repo following the instructinos in Domain map

Generate and run the query, returning list of maps (for now...)

add a filter to selecto. Send in a tuple with field name and filter value

Returns an Ecto.Query with all your filters and selections added..eventually!

Add to the Group By

Add to the Order By

add a field to the Select list. Send in one or a list of field names or selectable tuples TODO allow to send single, and special forms..

Link to this section Functions

Link to this function

available_columns(selecto)

Link to this function

available_filters(selecto)

Link to this function

configure(repo, domain)

Generate a selecto structure from this Repo following the instructinos in Domain map

Link to this function

execute(selecto, opts \\ [])

Generate and run the query, returning list of maps (for now...)

Link to this function

filter(selecto, filters)

add a filter to selecto. Send in a tuple with field name and filter value

Link to this function

gen_query(selecto, opts \\ [])

Returns an Ecto.Query with all your filters and selections added..eventually!

Link to this function

gen_sql(selecto)

Link to this function

group_by(selecto, groups)

Add to the Group By

Link to this function

order_by(selecto, orders)

Add to the Order By

Link to this macro

rollup(columns)

(macro)
Link to this function

select(selecto, fields)

add a field to the Select list. Send in one or a list of field names or selectable tuples TODO allow to send single, and special forms..