Skip to content

Adding SQLcl Liquibase Java Integration demo #55

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 1 addition & 49 deletions sqlcl/java/README.md
Original file line number Diff line number Diff line change
@@ -1,49 +1 @@
# sqlcl-java

This repository is a few examples of how to use [Oracle SQLcl](http://www.oracle.com/technetwork/developer-tools/sqlcl/overview/index.html) as a Java library.

# Env / Eclipse Setup

1. Download SQLcl
2. Unzip SQLcl
3. Add sql/lib/* files to the classpath

![](sqlcl-eclipse-path.png)

#

# Examples


## Run Entire script
This example uses the @myfile 'normal' sqlcl / sqlplus syntax to run and entire script.

[RunMyScript](src/RunMyScript.java)


## ParseScript and Execute
This is an example of parsing a file with the SQLcl script parser. Then iterating over the array of commands to execute and detect errors to be handled.

[ParseScriptRunOneAtATime.java](src/ParseScriptRunOneAtATime.java)


> Only 0 rows currently supported in a script resultsno rows selected
>
> Table KLRICE_TEST created.
>
>
> 1 row inserted.
>
>
> 1 row inserted.
>
>
> 1 row inserted.
>
> Only 0 rows currently supported in a script resultsno rows selected
>
> Rollback complete.
>
> no rows selected
>
> Table KLRICE_TEST dropped.
# List of demos and short descriptions
File renamed without changes.
File renamed without changes.
File renamed without changes.
49 changes: 49 additions & 0 deletions sqlcl/java/scriptrunner/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# sqlcl-java

This repository is a few examples of how to use [Oracle SQLcl](http://www.oracle.com/technetwork/developer-tools/sqlcl/overview/index.html) as a Java library.

# Env / Eclipse Setup

1. Download SQLcl
2. Unzip SQLcl
3. Add sql/lib/* files to the classpath

![](sqlcl-eclipse-path.png)

#

# Examples


## Run Entire script
This example uses the @myfile 'normal' sqlcl / sqlplus syntax to run and entire script.

[RunMyScript](src/RunMyScript.java)


## ParseScript and Execute
This is an example of parsing a file with the SQLcl script parser. Then iterating over the array of commands to execute and detect errors to be handled.

[ParseScriptRunOneAtATime.java](src/ParseScriptRunOneAtATime.java)


> Only 0 rows currently supported in a script resultsno rows selected
>
> Table KLRICE_TEST created.
>
>
> 1 row inserted.
>
>
> 1 row inserted.
>
>
> 1 row inserted.
>
> Only 0 rows currently supported in a script resultsno rows selected
>
> Rollback complete.
>
> no rows selected
>
> Table KLRICE_TEST dropped.
File renamed without changes.
8 changes: 8 additions & 0 deletions sqlcl/java/sqlcl-maven-integration/.idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions sqlcl/java/sqlcl-maven-integration/.idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions sqlcl/java/sqlcl-maven-integration/.idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions sqlcl/java/sqlcl-maven-integration/.idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions sqlcl/java/sqlcl-maven-integration/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

124 changes: 124 additions & 0 deletions sqlcl/java/sqlcl-maven-integration/.idea/uiDesigner.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions sqlcl/java/sqlcl-maven-integration/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading