TABLE
TABLE = 'strata_commit'
The table this index lives in.
A local index over the commits in the object store.
The bucket is the record; this is a copy of the parts of it a page load needs. Rendering a timeline, finding the commit in force at a moment, or counting what a retention level covers all have to answer questions about thousands of commits at once, and answering them by walking parent links through ranged GETs would cost one request per commit.
Nothing here is authoritative. Every column is a field of a commit object that already exists
under commits/, which is what makes it safe for an uninstall to drop the table and for
strata:reindex to rebuild it.
record(string $id, \Drupal\strata\Tree\Commit $commit, int $storedBytes = 0) : void
Records a commit, or updates the row for one already present.
A commit is immutable and addressed by its content, so re-recording one writes the same values it already holds. That makes a repeated flush and a repeated reindex both idempotent.
| string | $id | The commit id. |
| \Drupal\strata\Tree\Commit | $commit | The commit. |
| int | $storedBytes | Bytes the flush actually wrote, which the commit object itself does not know at the time it is sealed. |
parentsOf(string $id) : list<string>|null
What one commit builds on.
Two columns rather than the whole row, because a merge base walks thousands of commits and needs nothing else from any of them.
| string | $id | The commit id. |
Parent addresses, the first parent first, or NULL when the commit is not indexed. An indexed root returns an empty list, which is what tells "no parents" apart from "not here".
between(int $fromMicrotime, int $toMicrotime, int $limit = 100, int|null $level = null) : list<array<string,mixed>>
Commits covering a span of time, newest first.
| int | $fromMicrotime | Inclusive lower bound in unix microseconds. |
| int | $toMicrotime | Inclusive upper bound in unix microseconds. |
| int | $limit | Most rows to return. |
| int|null | $level | Only commits at this compaction level, or NULL for every level. |
The rows.