Docs / API / RepositoriesDB

RepositoriesDB

com.s8.meta.api.flow.repository

Repository DB behaves like a git-saved codebase, but with plain objects instead of files. Addresses, branches, versions, authors, comments.

Instance methods

createRepository
Name, address, branch, initial objects, commit message.
getRepository / getBranch
Metadata: S8RepositoryMetadata, S8BranchMetadata.
forkRepository / forkBranch
Fork the object graph the way you would fork a repo.
commitBranch
Commit a new version of the graph.
cloneBranch
Clone at a version, often S8SyncFlow.HEAD_VERSION.
deleteRepository
Remove a repository.

RepoS8Object

Binds _S8_vertex via RepoS8Vertex.FACTORY.createRepoS8Vertex(this). Use it as the node type of anything you want versioned like source.

Example

repo.java
RepositoriesDB repos = flow.repositories();
repos.createRepository(new CreateRepositoryS8Request(
    "MyRepo", "repo/ada/demo", "demo", "main",
    new RepoS8Object[]{ root }, "initial commit"));
CloneBranchS8Response clone = repos.cloneBranch(
    new CloneBranchS8Request("repo/ada/demo", "main"));
Intent When the data is the product — CAD, a document, a model — put it in a repository so history, fork, and clone are native.