-
Notifications
You must be signed in to change notification settings - Fork 0
Design
Gerald Quintana edited this page May 19, 2016
·
2 revisions
All the script execution is ran through an event pipeline
- ScriptScanner: scans the file system or the scan and look for scripts
- StoreFilter: skips a script if it's marked as ran in script store
- ScriptReader: Read the script line by line
- StoreUpdate: Mark the script as started or ended in the script store
-
VariableReplacer: Replace
${variable}
by its value in the script - MultineAggregator: Aggregates several lines into on query|request|statement detecting start|end markers
- EmptyFilter: skips empty or blank query|request|statement
- Executor: execute query|request|statement on target data store
- Display or export execute query|request|statement result
Script store is optional. It's used to remember which script were ran and what was the outcome of of their execution.
CREATE TABLE BEEPBEEP (
ID INT PRIMARY KEY AUTO_INCREMENT,
VERSION INT NOT NULL DEFAULT 1, -- For optimistic locking
FULL_NAME VARCHAR(512) NOT NULL, -- Script complete path
SIZE_BYTES INT NOT NULL, -- Script size in bytes
SHA1 VARCHAR(128) NOT NULL, -- Script SHA1 check sum
START_DATE TIMESTAMP NOT NULL, -- Execution start timestamp
END_DATE TIMESTAMP, -- Execution end timestamp
STATUS VARCHAR(16); -- Execution status STARTED, SUCCEEDED, FAILED
CREATE UNIQUE INDEX BEEPBEEP_FULL_NAME_IDX ON BEEPBEEP(FULL_NAME);
By default, script size and SHA1 can not change. There are a couple of settings on the StoreFilter to change that.
At the moment, if you need to change a script, you'll have to manually remove the line from the store.
- Home
- Design
- Data stores
- Tools
- Command line
- [Java API](https://github.com/gquintana/beepbeep/wiki/Java API)