diff --git a/.github/scripts/check-stale-docs.sh b/.github/scripts/check-stale-docs.sh index e31cf7ad..77c015fb 100755 --- a/.github/scripts/check-stale-docs.sh +++ b/.github/scripts/check-stale-docs.sh @@ -39,6 +39,11 @@ DEAD=( "gudusoft.dlineage.jar" "src/main/java/demos/" 'src\main\java\demos\' + ".;lib/*" + "build.xml" + "ftp.gudusoft.com" + "support.sqlparser.com" + "-Dexec.classpathScope" ) WHY=( @@ -46,6 +51,11 @@ WHY=( "the standalone jar is target/gsp_demo_java-1.0-SNAPSHOT-dlineage.jar" "second package root removed 2026-07-27; demos are under src/main/java/gudusoft/gsqlparser/demos/" "same, in Windows path form" + "lib/ was deleted on 2026-07-28; nothing needs a hand-written classpath, use the uber jar" + "both Ant builds were deleted on 2026-08-25; Maven and the .bat scripts are the two supported routes" + "does not resolve (NXDOMAIN, checked 2026-08-25)" + "does not resolve (NXDOMAIN, checked 2026-08-25)" + "unnecessary since the system-scope dependencies went; plain exec:java works" ) # scan ... -- prints every hit, returns 1 if there was any @@ -65,6 +75,42 @@ scan() { return "$failed" } +# check_links ... -- every relative markdown link must resolve +# +# Separate from the fixed-string scan above because it catches the other half of +# the same problem: not a document naming something deleted, but a document +# pointing at something that moved. Two had rotted unnoticed before this was +# written -- columnImpact linking ../dlineage from a directory where that +# resolves to antiSQLInjection/dlineage, and search linking ./visitors from +# inside search/ -- and neither was visible to any build. +check_links() { + python3 - "$@" <<'PY' +import os, re, sys + +bad = [] +for f in sys.argv[1:]: + base = os.path.dirname(f) + try: + text = open(f, encoding="utf-8").read() + except OSError as e: + bad.append((f, "", "unreadable: %s" % e)) + continue + for m in re.finditer(r"\]\(([^)#\s]+)(?:#[^)\s]*)?\)", text): + target = m.group(1) + if target.startswith(("http://", "https://", "mailto:")): + continue + resolved = os.path.normpath(os.path.join(base, target)) + if not os.path.exists(resolved): + bad.append((f, target, resolved)) + +for f, target, resolved in bad: + print(" %s -> %s" % (f, target)) + print(" ^ resolves to %s, which does not exist\n" % resolved) + +sys.exit(1 if bad else 0) +PY +} + self_test() { local tmp rc pass=0 fail=0 i tmp=$(mktemp -d) @@ -92,6 +138,36 @@ self_test() { fi done + # The link half of the check, proved the same way. + mkdir -p "$tmp/sub" + printf 'see [the sub page](sub/page.md)\n' >"$tmp/links-ok.md" + printf 'placeholder\n' >"$tmp/sub/page.md" + if check_links "$tmp/links-ok.md" >/dev/null 2>&1; then + echo " ok a resolving relative link passes" + pass=$((pass + 1)) + else + echo " FAIL a resolving relative link was reported as broken" + fail=$((fail + 1)) + fi + + printf 'see [the missing page](sub/gone.md)\n' >"$tmp/links-bad.md" + if check_links "$tmp/links-bad.md" >/dev/null 2>&1; then + echo " FAIL a broken relative link slipped through" + fail=$((fail + 1)) + else + echo " ok a broken relative link is caught" + pass=$((pass + 1)) + fi + + printf 'see [the product site](https://www.sqlparser.com/nope)\n' >"$tmp/links-http.md" + if check_links "$tmp/links-http.md" >/dev/null 2>&1; then + echo " ok an http link is left alone" + pass=$((pass + 1)) + else + echo " FAIL an http link was treated as a file path" + fail=$((fail + 1)) + fi + echo if [ "$fail" -gt 0 ]; then echo "self-test: $fail of $((pass + fail)) cases FAILED" @@ -107,28 +183,46 @@ if [ "${1:-}" = "--self-test" ]; then exit $? fi +all=() +while IFS= read -r f; do all+=("$f"); done < <(git ls-files '*.md') + +if [ "${#all[@]}" -eq 0 ]; then + echo "::error::no markdown files found to check; is this a git checkout?" + exit 1 +fi + +# The dead-string scan skips ALLOW; the link check does not. A file may have a +# reason to name something that was removed, but never to link at something +# that is not there. files=() -while IFS= read -r f; do +for f in "${all[@]}"; do skip=0 for a in "${ALLOW[@]}"; do if [ "$f" = "$a" ]; then skip=1; fi done if [ "$skip" -eq 0 ]; then files+=("$f"); fi -done < <(git ls-files '*.md') +done -if [ "${#files[@]}" -eq 0 ]; then - echo "::error::no markdown files found to check; is this a git checkout?" - exit 1 -fi +rc=0 echo "checking ${#files[@]} markdown files for references to deleted things" echo - if scan "${files[@]}"; then echo "ok: no documentation points at anything that has been removed" - exit 0 +else + echo "::error::documentation above still instructs the reader to use something that no longer exists" + echo "If a file's purpose is to record the removal, add it to ALLOW in $0." + rc=1 +fi + +echo +echo "checking relative links in ${#all[@]} markdown files" +echo +if check_links "${all[@]}"; then + echo "ok: every relative link resolves" +else + echo "::error::a relative link above points at a path that does not exist" + rc=1 fi -echo "::error::documentation above still instructs the reader to use something that no longer exists" -echo "If a file's purpose is to record the removal, add it to ALLOW in $0." -exit 1 +exit "$rc" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 911f303d..f64f3d3e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -64,9 +64,13 @@ jobs: # produced. Someone evaluating GSP for the first time reasonably concluded # the product was broken. # + # It also resolves every relative markdown link, which is the other half of + # the same problem -- not a document naming something deleted, but one + # pointing at something that moved. Two had rotted unnoticed. + # # --self-test runs first and on purpose: a fixed-string check that matches # nothing looks identical to a clean repository. - - name: Documentation does not point at deleted things + - name: Documentation does not point at deleted or missing things if: matrix.java == '21' run: | .github/scripts/check-stale-docs.sh --self-test diff --git a/README.md b/README.md index 9a0cdc16..c4ca5c94 100644 --- a/README.md +++ b/README.md @@ -117,6 +117,8 @@ built-in Oracle query when no file is supplied. If you have older notes telling you to add `-Dexec.classpathScope=compile`, you no longer need it. It worked around `system`-scope dependencies that are gone. +Twenty demo readmes still carried it until 2026-08-25; `check-stale-docs.sh` +now keeps it out. ## The demos @@ -431,7 +433,7 @@ than only building them. |---|---| | Parser version consistency | `set-parser-version.sh --check` across all four POMs | | The pre-commit hook | `test-pre-commit-hook.sh`: a drifting bump is refused in a throwaway clone | -| Documentation | `check-stale-docs.sh`: no readme names `pom_dlineage.xml`, `gudusoft.dlineage.jar` or the old `demos` package root; `--self-test` first, so a check that matches nothing cannot pass as a clean repo | +| Documentation | `check-stale-docs.sh`: no readme names a deleted thing (`pom_dlineage.xml`, `gudusoft.dlineage.jar`, the old `demos` package root, the Ant builds, two dead download hosts, `-Dexec.classpathScope`), and every relative link resolves; `--self-test` first, so a check that matches nothing cannot pass as a clean repo | | Licensed-only guard | `check-licensed-only-guard.sh`: each `licensed-only/*` module stops at `validate` **with the licence message**, not with `cannot find symbol` | | Build and test | JDK 8 and 21; 156 tests, and a run that skipped everything fails | | Demo smoke test | `checksyntax` against known SQL | diff --git a/build.xml b/build.xml deleted file mode 100644 index 39107fde..00000000 --- a/build.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/main/java/gudusoft/gsqlparser/demos/callgraph/readme.md b/src/main/java/gudusoft/gsqlparser/demos/callgraph/readme.md index 54fd5f59..f59666ab 100644 --- a/src/main/java/gudusoft/gsqlparser/demos/callgraph/readme.md +++ b/src/main/java/gudusoft/gsqlparser/demos/callgraph/readme.md @@ -12,7 +12,7 @@ java CallGraphDemo /f [/o ] ```bash mvn -q exec:java -Dexec.mainClass=gudusoft.gsqlparser.demos.callgraph.CallGraphDemo \ - -Dexec.args="/f samples/callgraph/sample_package.sql" -Dexec.classpathScope=compile + -Dexec.args="/f samples/callgraph/sample_package.sql" ``` ```json diff --git a/src/main/java/gudusoft/gsqlparser/demos/columninspect/readme.md b/src/main/java/gudusoft/gsqlparser/demos/columninspect/readme.md index 70299241..4d168450 100644 --- a/src/main/java/gudusoft/gsqlparser/demos/columninspect/readme.md +++ b/src/main/java/gudusoft/gsqlparser/demos/columninspect/readme.md @@ -23,7 +23,6 @@ works from a fresh clone with no database: ```bash mvn -q exec:java -Dexec.mainClass=gudusoft.gsqlparser.demos.columninspect.ColumnInspect \ - -Dexec.classpathScope=compile \ -Dexec.args="/t mssql /f samples/columninspect/sample.sql /metadata samples/columninspect/metadata.json /db testdb /schema dbo" ``` diff --git a/src/main/java/gudusoft/gsqlparser/demos/evaluator/readme.md b/src/main/java/gudusoft/gsqlparser/demos/evaluator/readme.md index 97281fdb..a0bb0b5f 100644 --- a/src/main/java/gudusoft/gsqlparser/demos/evaluator/readme.md +++ b/src/main/java/gudusoft/gsqlparser/demos/evaluator/readme.md @@ -12,7 +12,7 @@ java EvaluatorDemo [/f ] [/t ] ```bash mvn -q exec:java -Dexec.mainClass=gudusoft.gsqlparser.demos.evaluator.EvaluatorDemo \ - -Dexec.args="/f q.sql /t oracle" -Dexec.classpathScope=compile + -Dexec.args="/f q.sql /t oracle" ``` ```text diff --git a/src/main/java/gudusoft/gsqlparser/demos/events/readme.md b/src/main/java/gudusoft/gsqlparser/demos/events/readme.md index 038c4b19..c5586e81 100644 --- a/src/main/java/gudusoft/gsqlparser/demos/events/readme.md +++ b/src/main/java/gudusoft/gsqlparser/demos/events/readme.md @@ -17,8 +17,7 @@ name, `}` into a single identifier token first. Neither takes arguments; both are configured inline. ```bash -mvn -q exec:java -Dexec.mainClass=gudusoft.gsqlparser.demos.events.processTokenList \ - -Dexec.classpathScope=compile +mvn -q exec:java -Dexec.mainClass=gudusoft.gsqlparser.demos.events.processTokenList ``` > **Both demos fail as shipped.** diff --git a/src/main/java/gudusoft/gsqlparser/demos/findConstants/readme.md b/src/main/java/gudusoft/gsqlparser/demos/findConstants/readme.md index e09cf761..e7ed7962 100644 --- a/src/main/java/gudusoft/gsqlparser/demos/findConstants/readme.md +++ b/src/main/java/gudusoft/gsqlparser/demos/findConstants/readme.md @@ -14,7 +14,7 @@ java findConstants [/t ] ```bash mvn -q exec:java -Dexec.mainClass=gudusoft.gsqlparser.demos.findConstants.findConstants \ - -Dexec.args="q.sql /t oracle" -Dexec.classpathScope=compile + -Dexec.args="q.sql /t oracle" ``` For `SELECT a.id, b.name, 100 AS n FROM ta a JOIN tb b ON a.id = b.id WHERE a.x > 1 AND 'k' = 'k';` diff --git a/src/main/java/gudusoft/gsqlparser/demos/findproceduralsql/readme.md b/src/main/java/gudusoft/gsqlparser/demos/findproceduralsql/readme.md index cc92ccea..5cb6bb12 100644 --- a/src/main/java/gudusoft/gsqlparser/demos/findproceduralsql/readme.md +++ b/src/main/java/gudusoft/gsqlparser/demos/findproceduralsql/readme.md @@ -18,8 +18,7 @@ prints exactly that. ```bash mvn -q exec:java -Dexec.mainClass=gudusoft.gsqlparser.demos.findproceduralsql.FindProceduralSqlFiles \ - -Dexec.args="oracle /path/to/scripts /path/to/procedural-only" \ - -Dexec.classpathScope=compile + -Dexec.args="oracle /path/to/scripts /path/to/procedural-only" ``` Both directories are filesystem paths; the output directory receives copies, so diff --git a/src/main/java/gudusoft/gsqlparser/demos/formatsql/readme.md b/src/main/java/gudusoft/gsqlparser/demos/formatsql/readme.md index 312db8b8..8d32a862 100644 --- a/src/main/java/gudusoft/gsqlparser/demos/formatsql/readme.md +++ b/src/main/java/gudusoft/gsqlparser/demos/formatsql/readme.md @@ -26,7 +26,27 @@ WHERE ID = (SELECT sales_person ``` ## Usage -`java formatsql sqlfile.sql` + +The demo takes a bare filename — no `/f`: + +```bash +mvn package -DskipTests +mvn -q exec:java -Dexec.mainClass=gudusoft.gsqlparser.demos.formatsql.formatsql \ + -Dexec.args="your.sql" +``` + +Add `/tolerant` to keep formatting a file that contains statements the parser +rejects. `samples/formatsql/mixed-valid-invalid.sql` is checked in for exactly +that: without the flag it stops at the bad statement and tells you to add it, +and with it you get the formatted output plus `Formatter status: +OK_WITH_RECOVERY`. + +```bash +mvn -q exec:java -Dexec.mainClass=gudusoft.gsqlparser.demos.formatsql.formatsql \ + -Dexec.args="samples/formatsql/mixed-valid-invalid.sql /tolerant" +``` + +`formatsqlInHtml` in this directory writes the same output as HTML. ## [Format options](formatoptions.md) \ No newline at end of file diff --git a/src/main/java/gudusoft/gsqlparser/demos/generateLineage/README.md b/src/main/java/gudusoft/gsqlparser/demos/generateLineage/README.md index 8c393afb..4cede90e 100644 --- a/src/main/java/gudusoft/gsqlparser/demos/generateLineage/README.md +++ b/src/main/java/gudusoft/gsqlparser/demos/generateLineage/README.md @@ -9,8 +9,7 @@ be re-baselined after parser output changes. ```bash mvn -q exec:java \ -Dexec.mainClass=gudusoft.gsqlparser.demos.generateLineage.GenerateLineageExpected \ - -Dexec.args="" \ - -Dexec.classpathScope=compile + -Dexec.args="" ``` The YAML it operates on is the library's own lineage fixture data diff --git a/src/main/java/gudusoft/gsqlparser/demos/gettablecolumns/build.xml b/src/main/java/gudusoft/gsqlparser/demos/gettablecolumns/build.xml deleted file mode 100644 index a1ac1ba7..00000000 --- a/src/main/java/gudusoft/gsqlparser/demos/gettablecolumns/build.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/main/java/gudusoft/gsqlparser/demos/gettablecolumns/readme.md b/src/main/java/gudusoft/gsqlparser/demos/gettablecolumns/readme.md index 8fb51cad..a23c89af 100644 --- a/src/main/java/gudusoft/gsqlparser/demos/gettablecolumns/readme.md +++ b/src/main/java/gudusoft/gsqlparser/demos/gettablecolumns/readme.md @@ -3,14 +3,13 @@ Get all table and columns involved in the input SQL script, tells how table is e the clause where the column located such as select list. join condition, shows the datatype if a column is defined in create table statement. -For more detailed information about how this tools works, please check [this article](http://support.sqlparser.com/tutorials/gsp-demo-get-table-column/). ## Usage -`java runGetTableColumn [/f ] [/t ] [/]` +`runGetTableColumn [/f ] [/t ] [/]` ```bash mvn -q exec:java -Dexec.mainClass=gudusoft.gsqlparser.demos.gettablecolumns.runGetTableColumn \ - -Dexec.classpathScope=compile -Dexec.args="/f your.sql /t mssql" + -Dexec.args="/f your.sql /t mssql" ``` > **This demo opens no database connection.** It used to accept `/h /P /u /p` @@ -25,18 +24,19 @@ mvn -q exec:java -Dexec.mainClass=gudusoft.gsqlparser.demos.gettablecolumns.runG > can still be resolved without a server, by handing the analyser a `TSQLEnv`: > build one in code, as the `TSQLServerEnv` / `THiveEnv` classes at the bottom > of `runGetTableColumn.java` do, or parse one from a metadata JSON file with -> `gudusoft.gsqlparser.sqlenv.parser.TJSONSQLEnvParser`. The standalone -> "Binary version" below still ships the live-connection build. +> `gudusoft.gsqlparser.sqlenv.parser.TJSONSQLEnvParser`. -## Binary version -https://www.gudusoft.com/gsp_java/gettablecolumn.zip +## There is no separate binary -In order to run this utility, please install Oracle JDK1.8 or higher on your computer correctly. -Then, run this utility like this: +This readme used to point at `https://www.gudusoft.com/gsp_java/gettablecolumn.zip` +for a standalone build that carried the live-JDBC path. That URL returns **404** +(checked 2026-08-25), and the JDBC flags it documented — `/h /P /u /p /db +/schema` — were removed from this demo on 2026-07-28 along with the vendored +`sqlflow-exporter.jar` behind them. Live catalog extraction needs +`gudusoft.gsqlparser.sqlenv.T*SQLDataSource`, which the public trial parser does +not ship; see [`licensed-only/`](../../../../../../../licensed-only/README.md). -``` -java -jar gudusoft.gettablecolumns.jar /t mssql /f path_to_sql_file -``` +Build from source instead — the demo is part of the ordinary build. ## Resolve the ambiguous columns in SQL query ```sql @@ -82,31 +82,7 @@ version"** above, not to the build in this repository; they were removed here on /schema: Optional, specify the schema which is used for extracting metadata. ``` -When you use this feature, you should put the jdbc driver to your java classpath, and use java -cp command to load the jdbc driver jar. - -Currently, gsp able to connect to the following databases with the proper JDBC driver -``` -azuresql, greenplum, mysql, netezza, oracle, postgresql, redshift, snowflake, sqlserver, teradata -``` - - -### connect to SQL Server -Tables are under this schema: `AdventureWorksDW2019/dbo`. - -```sh -java -cp .;lib/*;external_lib/* gudusoft.gsqlparser.demos.gettablecolumns.runGetTableColumn /t mssql /h localhost /P 1433 /u root /p password /schema AdventureWorksDW2019/dbo /f sample.sql /showDetail -``` - -### connect to Oracle -Tables are under `HR` schema and connect to database using `orcl` instance. - -```sh -java -cp .;lib/*;external_lib/* gudusoft.gsqlparser.demos.gettablecolumns.runGetTableColumn /t oracle /h localhost /P 1521 /u root /p password /db orcl /schema HR /f sample.sql /showDetail -``` - -### connect to MySQL -Tables are under `employees` database. - -```sh -java -cp .;lib/*;external_lib/* gudusoft.gsqlparser.demos.gettablecolumns.runGetTableColumn /t mysql /h localhost /P 3306 /u root /p password /db employees /f sample.sql /showDetail -``` +Those flags are gone from this build. To resolve ambiguous columns without a +database, hand the analyser a `TSQLEnv` as described above, or use the +`columninspect` demo, which reads the same metadata from a JSON file — +`samples/columninspect/` has a runnable pair. diff --git a/src/main/java/gudusoft/gsqlparser/demos/listGSPInfo/readme.md b/src/main/java/gudusoft/gsqlparser/demos/listGSPInfo/readme.md index 5d3f6882..8854e0ae 100644 --- a/src/main/java/gudusoft/gsqlparser/demos/listGSPInfo/readme.md +++ b/src/main/java/gudusoft/gsqlparser/demos/listGSPInfo/readme.md @@ -11,8 +11,7 @@ come down to the parser version or the trial-vs-full distinction. Takes no arguments. ```bash -mvn -q exec:java -Dexec.mainClass=gudusoft.gsqlparser.demos.listGSPInfo.listGSPInfo \ - -Dexec.classpathScope=compile +mvn -q exec:java -Dexec.mainClass=gudusoft.gsqlparser.demos.listGSPInfo.listGSPInfo ``` ```text diff --git a/src/main/java/gudusoft/gsqlparser/demos/modifySelect/readme.md b/src/main/java/gudusoft/gsqlparser/demos/modifySelect/readme.md index 6ca5102f..989e4d9f 100644 --- a/src/main/java/gudusoft/gsqlparser/demos/modifySelect/readme.md +++ b/src/main/java/gudusoft/gsqlparser/demos/modifySelect/readme.md @@ -12,8 +12,7 @@ already non-trivial, where appending ` AND ...` to the text would not be. Takes no arguments; the query is inline in `ModifySelect.java`. ```bash -mvn -q exec:java -Dexec.mainClass=gudusoft.gsqlparser.demos.modifySelect.ModifySelect \ - -Dexec.classpathScope=compile +mvn -q exec:java -Dexec.mainClass=gudusoft.gsqlparser.demos.modifySelect.ModifySelect ``` ```text diff --git a/src/main/java/gudusoft/gsqlparser/demos/modifysql/readme.md b/src/main/java/gudusoft/gsqlparser/demos/modifysql/readme.md index a754bd2a..cb7c9203 100644 --- a/src/main/java/gudusoft/gsqlparser/demos/modifysql/readme.md +++ b/src/main/java/gudusoft/gsqlparser/demos/modifysql/readme.md @@ -12,8 +12,7 @@ manipulation. Each takes no arguments; the query is inline in its source. ## Usage ```bash -mvn -q exec:java -Dexec.mainClass=gudusoft.gsqlparser.demos.modifysql.replaceTablename \ - -Dexec.classpathScope=compile +mvn -q exec:java -Dexec.mainClass=gudusoft.gsqlparser.demos.modifysql.replaceTablename ``` ```text diff --git a/src/main/java/gudusoft/gsqlparser/demos/performance/readme.md b/src/main/java/gudusoft/gsqlparser/demos/performance/readme.md index fdf47316..b90e3d04 100644 --- a/src/main/java/gudusoft/gsqlparser/demos/performance/readme.md +++ b/src/main/java/gudusoft/gsqlparser/demos/performance/readme.md @@ -17,8 +17,7 @@ many statements. Neither takes arguments. ```bash -mvn -q exec:java -Dexec.mainClass=gudusoft.gsqlparser.demos.performance.ParserPoolDemo \ - -Dexec.classpathScope=compile +mvn -q exec:java -Dexec.mainClass=gudusoft.gsqlparser.demos.performance.ParserPoolDemo ``` ```text diff --git a/src/main/java/gudusoft/gsqlparser/demos/removeCondition/readme.md b/src/main/java/gudusoft/gsqlparser/demos/removeCondition/readme.md index 84c463c3..80bb96ee 100644 --- a/src/main/java/gudusoft/gsqlparser/demos/removeCondition/readme.md +++ b/src/main/java/gudusoft/gsqlparser/demos/removeCondition/readme.md @@ -14,8 +14,7 @@ and `sqlrefactor`, which cleans up redundant parentheses. Takes no arguments; the query is inline in `removeCondition.java`. ```bash -mvn -q exec:java -Dexec.mainClass=gudusoft.gsqlparser.demos.removeCondition.removeCondition \ - -Dexec.classpathScope=compile +mvn -q exec:java -Dexec.mainClass=gudusoft.gsqlparser.demos.removeCondition.removeCondition ``` ```text diff --git a/src/main/java/gudusoft/gsqlparser/demos/scansql/readme.md b/src/main/java/gudusoft/gsqlparser/demos/scansql/readme.md deleted file mode 100644 index 63dcf3c6..00000000 --- a/src/main/java/gudusoft/gsqlparser/demos/scansql/readme.md +++ /dev/null @@ -1,7 +0,0 @@ -scan sql - -### Binary version - -http://ftp.gudusoft.com/dl/scansql/scanSQL_trial.zip - -scansql /t mssql /d path_to_directory_includes_sql_files \ No newline at end of file diff --git a/src/main/java/gudusoft/gsqlparser/demos/snowflake/readme.md b/src/main/java/gudusoft/gsqlparser/demos/snowflake/readme.md index 5a8736b6..5486bf0e 100644 --- a/src/main/java/gudusoft/gsqlparser/demos/snowflake/readme.md +++ b/src/main/java/gudusoft/gsqlparser/demos/snowflake/readme.md @@ -14,7 +14,7 @@ java SnowflakeSQLExtractor [/f ] [/d **Needs Java 8–14.** It evaluates the JavaScript with Nashorn, which was diff --git a/src/main/java/gudusoft/gsqlparser/demos/sqldetect/readme.md b/src/main/java/gudusoft/gsqlparser/demos/sqldetect/readme.md index ac5c9a97..2781dbb0 100644 --- a/src/main/java/gudusoft/gsqlparser/demos/sqldetect/readme.md +++ b/src/main/java/gudusoft/gsqlparser/demos/sqldetect/readme.md @@ -15,7 +15,7 @@ java SQLDetect [/o ] [/t ] ```bash mvn -q exec:java -Dexec.mainClass=gudusoft.gsqlparser.demos.sqldetect.SQLDetect \ - -Dexec.args="q.sql /t oracle" -Dexec.classpathScope=compile + -Dexec.args="q.sql /t oracle" ``` ```text diff --git a/src/main/java/gudusoft/gsqlparser/demos/sqlenv/readme.md b/src/main/java/gudusoft/gsqlparser/demos/sqlenv/readme.md index 3a397f43..fd3ed81f 100644 --- a/src/main/java/gudusoft/gsqlparser/demos/sqlenv/readme.md +++ b/src/main/java/gudusoft/gsqlparser/demos/sqlenv/readme.md @@ -17,7 +17,7 @@ java runSQLEnv [/f ] ```bash mvn -q exec:java -Dexec.mainClass=gudusoft.gsqlparser.demos.sqlenv.runSQLEnv \ - -Dexec.args="/f schema.json" -Dexec.classpathScope=compile + -Dexec.args="/f schema.json" ``` The `/f` argument is the **JSON metadata file**, not a SQL script. `TJsonSQLEnv` diff --git a/src/main/java/gudusoft/gsqlparser/demos/sqlrefactor/readme.md b/src/main/java/gudusoft/gsqlparser/demos/sqlrefactor/readme.md index e861f848..ad6a261a 100644 --- a/src/main/java/gudusoft/gsqlparser/demos/sqlrefactor/readme.md +++ b/src/main/java/gudusoft/gsqlparser/demos/sqlrefactor/readme.md @@ -18,7 +18,7 @@ SELECT * FROM ta WHERE ((a.x > 1)); SQL mvn -q exec:java -Dexec.mainClass=gudusoft.gsqlparser.demos.sqlrefactor.rmdupParenthesis \ - -Dexec.args="paren.sql /t mssql" -Dexec.classpathScope=runtime + -Dexec.args="paren.sql /t mssql" ``` ``` diff --git a/src/main/java/gudusoft/gsqlparser/demos/sqltranslator/readme.md b/src/main/java/gudusoft/gsqlparser/demos/sqltranslator/readme.md index 624e8164..9d39ebac 100644 --- a/src/main/java/gudusoft/gsqlparser/demos/sqltranslator/readme.md +++ b/src/main/java/gudusoft/gsqlparser/demos/sqltranslator/readme.md @@ -19,7 +19,7 @@ a file. ```bash mvn -q exec:java -Dexec.mainClass=gudusoft.gsqlparser.demos.sqltranslator.SqlTranslator \ - -Dexec.args="q.sql oracle mysql" -Dexec.classpathScope=compile + -Dexec.args="q.sql oracle mysql" ``` ```text diff --git a/src/main/java/gudusoft/gsqlparser/demos/traceColumn/readme.md b/src/main/java/gudusoft/gsqlparser/demos/traceColumn/readme.md index bf0af3cb..11f6a2f9 100644 --- a/src/main/java/gudusoft/gsqlparser/demos/traceColumn/readme.md +++ b/src/main/java/gudusoft/gsqlparser/demos/traceColumn/readme.md @@ -11,7 +11,7 @@ reads from, recursing into subqueries, derived tables and nested expressions. `/f` file argument or CLI parsing here, unlike most other demos. Run it with: ```bash -mvn -q exec:java -Dexec.mainClass=gudusoft.gsqlparser.demos.traceColumn.runTraceColumn -Dexec.classpathScope=compile +mvn -q exec:java -Dexec.mainClass=gudusoft.gsqlparser.demos.traceColumn.runTraceColumn ``` To trace a different query, edit the `sqltext` (or the vendor passed to diff --git a/src/main/java/gudusoft/gsqlparser/demos/tracedatalineage/readme.md b/src/main/java/gudusoft/gsqlparser/demos/tracedatalineage/readme.md index 4672913a..f37cbad9 100644 --- a/src/main/java/gudusoft/gsqlparser/demos/tracedatalineage/readme.md +++ b/src/main/java/gudusoft/gsqlparser/demos/tracedatalineage/readme.md @@ -22,8 +22,7 @@ writes the result to a file instead of stdout. ```bash mvn -q exec:java -Dexec.mainClass=gudusoft.gsqlparser.demos.tracedatalineage.traceDataLineage \ - -Dexec.args="samples/tracedatalineage" \ - -Dexec.classpathScope=compile + -Dexec.args="samples/tracedatalineage" ``` ``` diff --git a/src/main/java/gudusoft/gsqlparser/demos/visitors/readme.md b/src/main/java/gudusoft/gsqlparser/demos/visitors/readme.md index 8efc62f0..7af066e6 100644 --- a/src/main/java/gudusoft/gsqlparser/demos/visitors/readme.md +++ b/src/main/java/gudusoft/gsqlparser/demos/visitors/readme.md @@ -27,7 +27,7 @@ usage line. ```bash mvn -q exec:java -Dexec.mainClass=gudusoft.gsqlparser.demos.visitors.SearchSelect \ - -Dexec.args="q.sql /t oracle" -Dexec.classpathScope=compile + -Dexec.args="q.sql /t oracle" ``` ```text