Skip to content

Commit

Permalink
compiled dbQueryAllDatabases using go compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
fchastanet committed Sep 1, 2024
1 parent f2874dd commit fd7c77d
Show file tree
Hide file tree
Showing 42 changed files with 2,289 additions and 1,910 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config-github.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,6 @@ repos:
stages: [manual] # GITHUB

- repo: https://github.com/fchastanet/bash-compiler
rev: 0.3.2
rev: 0.3.3
hooks:
- id: buildBashBinaries
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,6 @@ repos:
stages: [] # GITHUB

- repo: https://github.com/fchastanet/bash-compiler
rev: 0.3.2
rev: 0.3.3
hooks:
- id: buildBashBinaries
7 changes: 7 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@
"name": "Bash-Debug (generic)",
"program": "${file}"
},
{
"type": "bashdb",
"request": "launch",
"name": "dbQueryAllDatabases",
"program": "bin/dbQueryAllDatabases",
"args": ["-f", "ckls.local"]
},
{
"type": "bashdb",
"request": "launch",
Expand Down
9 changes: 5 additions & 4 deletions bin/dbImport
Original file line number Diff line number Diff line change
Expand Up @@ -2522,8 +2522,9 @@ dbImportCommandParse() {

# @description display command options and arguments help for dbImportCommand
dbImportCommandHelp() {
Array::wrap2 ' ' 80 0 "${__HELP_TITLE_COLOR}SYNOPSIS:${__RESET_COLOR}" \
"Import source db into target db using eventual table filter."
echo -e "${__HELP_TITLE_COLOR}SYNOPSIS:${__RESET_COLOR}"
Array::wrap2 ' ' 76 4 " " "Import source db into target db using eventual table filter."

echo
echo

Expand All @@ -2549,11 +2550,11 @@ dbImportCommandHelp() {

Array::wrap2 " " 80 2 " ${__HELP_OPTION_COLOR}fromDbName${__HELP_NORMAL} {single} (mandatory)
"
Array::wrap2 ' ' 76 4 " " "The name of the source/remote database."
Array::wrap2 ' ' 76 4 " " "The name of the source/remote database."
echo
Array::wrap2 " " 80 2 " [${__HELP_OPTION_COLOR}<targetDbName>${__HELP_NORMAL} {single}]
"
Array::wrap2 ' ' 76 4 " " "The name of the target database" "Default value: <fromDbName>(without extension)" ""
Array::wrap2 ' ' 76 4 " " "The name of the target database" "Default value: <fromDbName>(without extension)" ""
echo
# ------------------------------------------
# options section
Expand Down
19 changes: 10 additions & 9 deletions bin/dbImportProfile
Original file line number Diff line number Diff line change
Expand Up @@ -1632,24 +1632,24 @@ longDescriptionFunction() {

optionProfileHelpFunction() {
Array::wrap2 " " 80 4 \
" The name of the profile to write in profiles directory.\r" \
" The name of the profile to write in profiles directory.\n" \
"If not provided, the file name pattern will be 'auto_<dsn>_<fromDbName>.sh'"
echo
}

optionFromDsnHelpFunction() {
Array::wrap2 " " 80 4 \
" dsn to use for source database (Default: ${defaultFromDsn})\r" \
" dsn to use for source database (Default: ${defaultFromDsn})\n" \
"if not provided, the file name pattern will be 'auto_<dsn>_<fromDbName>.sh'"
echo
}

optionRatioHelpFunction() {
Array::wrap2 " " 80 4 \
" define the ratio to use (0 to 100% - default 70).\r" \
"- 0 means profile will filter out all the tables\r" \
"- 100 means profile will keep all the tables.\r" \
"Eg: 70 means that tables with size(table+index)\r" \
" define the ratio to use (0 to 100% - default 70).\n" \
"- 0 means profile will filter out all the tables\n" \
"- 100 means profile will keep all the tables.\n" \
"Eg: 70 means that tables with size(table+index)\n" \
"that are greater than 70% of the max table size will be excluded."
echo
}
Expand Down Expand Up @@ -2199,8 +2199,9 @@ dbImportProfileCommandParse() {

# @description display command options and arguments help for dbImportProfileCommand
dbImportProfileCommandHelp() {
Array::wrap2 ' ' 80 0 "${__HELP_TITLE_COLOR}SYNOPSIS:${__RESET_COLOR}" \
"Generate optimized profiles to be used by dbImport."
echo -e "${__HELP_TITLE_COLOR}SYNOPSIS:${__RESET_COLOR}"
Array::wrap2 ' ' 76 4 " " "Generate optimized profiles to be used by dbImport."

echo
echo

Expand All @@ -2226,7 +2227,7 @@ dbImportProfileCommandHelp() {

Array::wrap2 " " 80 2 " ${__HELP_OPTION_COLOR}fromDbName${__HELP_NORMAL} {single} (mandatory)
"
Array::wrap2 ' ' 76 4 " " "The name of the source/remote database."
Array::wrap2 ' ' 76 4 " " "The name of the source/remote database."
echo
# ------------------------------------------
# options section
Expand Down
9 changes: 5 additions & 4 deletions bin/dbImportStream
Original file line number Diff line number Diff line change
Expand Up @@ -2300,8 +2300,9 @@ dbImportStreamCommandParse() {

# @description display command options and arguments help for dbImportStreamCommand
dbImportStreamCommandHelp() {
Array::wrap2 ' ' 80 0 "${__HELP_TITLE_COLOR}SYNOPSIS:${__RESET_COLOR}" \
"Stream tar.gz file or gz file through mysql."
echo -e "${__HELP_TITLE_COLOR}SYNOPSIS:${__RESET_COLOR}"
Array::wrap2 ' ' 76 4 " " "Stream tar.gz file or gz file through mysql."

echo
echo

Expand All @@ -2327,11 +2328,11 @@ dbImportStreamCommandHelp() {

Array::wrap2 " " 80 2 " ${__HELP_OPTION_COLOR}argDumpFile${__HELP_NORMAL} {single} (mandatory)
"
Array::wrap2 ' ' 76 4 " " "The file that will be streamed through mysql."
Array::wrap2 ' ' 76 4 " " "The file that will be streamed through mysql."
echo
Array::wrap2 " " 80 2 " ${__HELP_OPTION_COLOR}argTargetDbName${__HELP_NORMAL} {single} (mandatory)
"
Array::wrap2 ' ' 76 4 " " "The name of the mysql target database."
Array::wrap2 ' ' 76 4 " " "The name of the mysql target database."
echo
# ------------------------------------------
# options section
Expand Down
Loading

0 comments on commit fd7c77d

Please sign in to comment.