Scripts
com.s8.meta.api.script
Scripts are for devops: correct a database entry by hand, seed a service with presets, run a one-shot migration. They receive the same S8SyncFlow as a web request, without a front.
Types
- S8Script.run(flow)
- void run(S8SyncFlow flow) throws S8FlowException
- S8ScriptRunner.run(user, script)
- Execute as a given user.
- S8ScriptRunnerFactory.createScriptRunner(configPathname, bootLayerOrigin)
- Loaded as
S8.SCRIPT_RUNNER_FACTORY.
Example
S8ScriptRunner runner = S8.SCRIPT_RUNNER_FACTORY.createScriptRunner(
"/path/to/config.xml", LaunchServer.class);
runner.run(adminUser, flow -> {
flow.tables().getRow("users", "u-1");
});
Intent Prefer a script over a throwaway SQL console. The types, annotations, and access control are the same as production.