TablesDB
com.s8.meta.api.flow.table
Flash persistency. Tables hold RowS8Object rows addressed by a string key. Table ids match [a-zA-Z0-9\-_]+.
Instance methods
- createTable(request)
- CreateTableS8Response createTable(CreateTableS8Request)
- getRow(request)
- GetRowS8Response getRow(GetRowS8Request)
- getRow(tableId, rowKey)
- Convenience. default GetRowS8Response getRow(String, String)
- putRow(request)
- PutRowS8Response putRow(PutRowS8Request)
- selectRows(request)
- Filter with
S8Filter<T>. <T extends RowS8Object> SelectRowsS8Response<T> selectRows(SelectRowsS8Request<T>)
RowS8Object
Abstract row. Final S8_key. Annotate the class with @S8RowType(name=…). Row type names are a storage contract: evolve by introducing a new type and migrating, not by silently reshaping the old one.
Example
@S8RowType(name = "user-v1")
public class UserRow extends RowS8Object {
public String email;
public UserRow(String id) { super(id); }
}
TablesDB db = flow.tables();
db.createTable(new CreateTableS8Request("users", true));
UserRow row = new UserRow("u-42");
row.email = "ada@stack8.tech";
db.putRow(new PutRowS8Request("users", row, true, true));
GetRowS8Response got = db.getRow("users", "u-42");
if (got.status == GetRowS8Response.Status.OK) {
UserRow u = (UserRow) got.record;
}
Intent Use tables when you want key/value speed with typed Java objects and optional in-process filters — not when you need a versioned graph (that is spaces / repositories).