This commit is contained in:
bel
2023-10-15 10:32:09 -06:00
commit dcac1c8b1b
12 changed files with 176 additions and 0 deletions

BIN
3_/db.db Normal file

Binary file not shown.

31
3_/mvp.sh Normal file
View File

@@ -0,0 +1,31 @@
#! /bin/bash
main() {
set -e
set -o pipefail
local bin=../0_setup/0_setup
local cmds=(
'DROP TABLE IF EXISTS events'
'
CREATE TABLE events (
sensor_id integer not null,
event_type integer not null
);
'
'INSERT INTO events VALUES (2, 2)'
'INSERT INTO events VALUES (2, 4)'
'INSERT INTO events VALUES (2, 2)'
'INSERT INTO events VALUES (3, 2)'
'INSERT INTO events VALUES (2, 3)'
"$@"
)
for cmd in "${cmds[@]}"; do
echo =================
$bin -q "$cmd"
echo
done
}
main "$@"