View Source EctoFoundationDB.Indexer.SchemaMetadata (Ecto.Adapters.FoundationDB v0.5.0)

This is Indexer keeps track of various actions for a Schema:

  • inserts: Incremented for each insert or upsert
  • deletes: Incremented for each delete
  • collection: Incremented for each insert, update, or delete
  • updates: Incremented for each update (via Repo.update/*)
  • changes: Incremented for each insert, upsert, delete, or update

These keys are useful for creating watches that will notify your application of those actions. For example, if you create a watch on the inserts key, your application will be notified when a new record is inserted, and you can react however you like.

See it in action: Sync Engine Part II - Collections

Summary

Functions

Asynchronously get the changes key.

Asynchronously get the collection key.

Asynchronously get the deletes key.

Asynchronously get the inserts key.

Asynchronously get the updates key.

Synchronous get on the changes key.

Synchronous get on the collection key.

Synchronous get on the deletes key.

Synchronous get on the inserts key.

Synchronous get on the updates key.

Create a watch on the changes key.

Create a watch on the collection key.

Create a watch on the deletes key.

Create a watch on the inserts key.

Create a watch on the updates key.

Functions

Asynchronously get the changes key.

Link to this function

async_collection(schema)

View Source

Asynchronously get the collection key.

Asynchronously get the deletes key.

Asynchronously get the inserts key.

Asynchronously get the updates key.

Synchronous get on the changes key.

Link to this function

collection(schema, opts)

View Source

Synchronous get on the collection key.

Synchronous get on the deletes key.

Synchronous get on the inserts key.

Synchronous get on the updates key.

Link to this function

watch_changes(schema, opts \\ [])

View Source

Create a watch on the changes key.

Link to this function

watch_collection(schema, opts \\ [])

View Source

Create a watch on the collection key.

Link to this function

watch_deletes(schema, opts \\ [])

View Source

Create a watch on the deletes key.

Link to this function

watch_inserts(schema, opts \\ [])

View Source

Create a watch on the inserts key.

Link to this function

watch_updates(schema, opts \\ [])

View Source

Create a watch on the updates key.