Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Lehre und Unterricht
Datenbank- und Informations-Systeme
DataEngineering
Commits
8bf37c8f
Commit
8bf37c8f
authored
May 22, 2020
by
Marcel Huber
Browse files
more shellcheck based cleanup
parent
c9866fba
Changes
3
Show whitespace changes
Inline
Side-by-side
ColumnStore/Queries_MonetDB.sh
View file @
8bf37c8f
...
...
@@ -4,9 +4,6 @@ _MY_DIR="$(cd "$(dirname "${0:-.}")" && pwd)"
_EX_DIR
=
"
$(
realpath
--relative-to
=
.
"
$_MY_DIR
"
)
"
test
-z
"
$_EX_DIR
"
&&
_EX_DIR
=
.
eo0
=
""
eo1
=
""
# shellcheck source=./Queries_common.sh
.
$_EX_DIR
/Queries_common.sh
# disable globbing for star queries (*)
...
...
@@ -24,7 +21,6 @@ set schema ds2;
set role sysadmin;
--
$(
for
q
in
"
${
queries
[@]
}
"
;
do
explainopts
=
"
$(
eval echo
$(
echo
\"\$
$(
cut
-d
'|'
-f1
<<<
"
$q
"
)
\"
))
"
;
aufgabe
=
"
$(
cut
-d
'|'
-f2
<<<
"
$q
"
)
"
;
aufgabe_desc
=
"
$(
cut
-d
'|'
-f3
<<<
"
$q
"
)
"
;
query
=
"
$(
cut
-d
'|'
-f4
<<<
"
$q
"
)
"
;
...
...
@@ -42,8 +38,10 @@ $(for q in "${queries[@]}"; do
echo
"select '-- end::
${
aufgabe
}
-plan[]';"
echo
"select '-- tag::
${
aufgabe
}
-timing[]';"
echo
"
\f
trash"
# shellcheck disable=SC2028
echo
"
\t
performance"
echo
"
$query
"
# shellcheck disable=SC2028
echo
"
\t
none"
echo
"
\f
tab"
echo
"select '-- end::
${
aufgabe
}
-timing[]';"
...
...
ColumnStore/Queries_PostgreSQL.sh
View file @
8bf37c8f
...
...
@@ -6,8 +6,9 @@ test -z "$_EX_DIR" && _EX_DIR=.
db_name
=
${
1
:-
ds2
}
db_user
=
${
2
:-
$db_name
}
# shellcheck disable=SC2034
eo0
=
""
# shellcheck disable=SC2034
eo1
=
"EXPLAIN (ANALYZE 1,COSTS 0,TIMING 1,BUFFERS 0,VERBOSE 0,FORMAT TEXT)"
# shellcheck source=./Queries_common.sh
...
...
@@ -41,7 +42,7 @@ VACUUM (ANALYZE);
\c
$db_name
$db_user
$(
for
q
in
"
${
queries
[@]
}
"
;
do
explainopts
=
"
$(
eval echo
$(
echo
\"
\$
$(
cut
-d
'|'
-f1
<<<
"
$q
"
)
\"
)
)
"
;
explainopts
=
"
$(
eval echo
\$
"
$(
cut
-d
'|'
-f1
<<<
"
$q
"
)
"
)
"
;
aufgabe
=
"
$(
cut
-d
'|'
-f2
<<<
"
$q
"
)
"
;
aufgabe_desc
=
"
$(
cut
-d
'|'
-f3
<<<
"
$q
"
)
"
;
query
=
"
$(
cut
-d
'|'
-f4
<<<
"
$q
"
)
"
;
...
...
ColumnStore/execqueries.sh
View file @
8bf37c8f
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment