class

Rules::View

Inherits Reference < Object

Class methods

register(view : View) : Nil

Registers a view.

Source
registry

All registered views.

Source
unregister(view : View) : Nil

Unregisters a view.

Source

Instance methods

membership(key : Key | Nil = nil) : Tuple(String, Array(DB::Any))

The membership query, plus its bind arguments.

The query selects rows of (from_iri, to_iri, position). A key of nil returns the full set (the batch reconcile); otherwise it returns the form scoped to a single member.

Source
project(object_iri : String) : Array(Key)

Maps a changed base fact to the collection key(s).

Source
repositions?

Whether members reposition on new support (recency views) or stay fixed at first appearance (append-only views).

Source
stored_scope(key : Key) : Tuple(String, Array(DB::Any))

The SQL predicate and bind arguments identifying the stored rows that belong to a scope key, used to bound the scoped reconcile's delete.

Defaults to the identity case.

Source
subjects(username : String) : Array(String)

The pub/sub subjects to notify when one of username's rows in this view changes.

It's empty by default -- the view publishes no real-time updates. Views that do mix in NotifiesNotifications or NotifiesTimeline.

Source
type

The relationship subtype this view materializes.

Source

Nested types