Reminisce.Schema (reminisce v0.6.0)

Copy Markdown View Source

The library's TypeDB schema, as data.

One description drives three things: the define that Reminisce.setup/1 sends, the check that refuses a database whose schema differs, and the type lists that Reminisce.backup/2 walks (together with whatever a host defined after it).

It is kept by release: 0.2's types, 0.3's additions (docs/spec.md §A.6), 0.4's (§B.7) and 0.5's (§C.9), which Reminisce.upgrade/1 sends to an earlier store as one define of the additions it lacks. A new database gets them all in one define.

Summary

Functions

The type labels the releases after from add, up to this one: for "0.2", 0.3's, 0.4's and 0.5's.

The attribute types the library owns: {label, value_type, constraint}, the constraint being nil, the allowed values or {:range, "min..max"}.

The define query for the library's schema.

The define that brings a store at from to this release (docs/spec.md §A.6, §B.7): the additions of every later release alone, as one define, for Reminisce.upgrade/1.

The entity types the library owns.

What the library expects to find, as sets of facts comparable with those setup/1 reads from a database it did not create: this release's, or an earlier one's.

The relation types the library owns.

The release whose schema this library defines.

The releases whose schemas this library knows, oldest first.

Functions

additions(from)

The type labels the releases after from add, up to this one: for "0.2", 0.3's, 0.4's and 0.5's.

attributes()

The attribute types the library owns: {label, value_type, constraint}, the constraint being nil, the allowed values or {:range, "min..max"}.

define()

The define query for the library's schema.

define_additions(from)

The define that brings a store at from to this release (docs/spec.md §A.6, §B.7): the additions of every later release alone, as one define, for Reminisce.upgrade/1.

entities()

The entity types the library owns.

expected_facts(release \\ List.last(["0.2", "0.3", "0.4", "0.5"]))

What the library expects to find, as sets of facts comparable with those setup/1 reads from a database it did not create: this release's, or an earlier one's.

relations()

The relation types the library owns.

release()

The release whose schema this library defines.

releases()

The releases whose schemas this library knows, oldest first.