OwnedStore

io.eezo.core.OwnedStore
trait OwnedStore[A, V]

The rows of one model, narrowable to the user who owns them.

It sits beside Store rather than inside it because the five operations are the vocabulary the derived seven speak and a sixth would be a query language on the seam. Narrowing is a different question: it answers a Store[A] and hands it back, so everything downstream of a narrowing still sees exactly the five, and a derived handler cannot tell a scoped store from a whole one. That is the point. The refusal of a foreign row is then the absence of a row rather than a check somebody has to remember to write.

Both halves of Store implement it, db's through a where on the owner column and http's through a filter, and the generated route table is the only file where both names appear.

Type parameters

V

the owner's own type, which is an Id[U] for every caller eezo ships. It is a parameter and not Id[?] because db needs a Column[V] to bind it, and a wildcard has none.

Attributes

Source
OwnedStore.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def by(owner: V): Store[A]

This owner's rows, as a store of their own.

This owner's rows, as a store of their own.

Not memoised. One of these per call is an allocation, and a cache keyed by owner is a map that grows with the number of users and never shrinks.

Attributes

Source
OwnedStore.scala