pcah/python-clean-architecture

Data: additional DAO queries

lhaze opened this issue · 0 comments

lhaze commented

Let's follow SQLAlchemy conventions on querying API.

Add some expected lazy queries:

  • filter_by(id or ids)
  • aggregate
  • order_by
  • annotate

... and some evaluating queries:

  • slice aka [2:5]
  • first (a special case of slicing)
  • no-argument get (aka one) for querying unique keys that aren't id (primary key) (?)

Modification:

  • get(id) should be accepting situations when object is not found (like current get_or_none)