-
Notifications
You must be signed in to change notification settings - Fork 348
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bfd9151
commit 79f3c58
Showing
24 changed files
with
610 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,5 +31,5 @@ jobs: | |
include: | ||
stage: release | ||
if: type != pull_request | ||
script: | ||
script: | ||
- travis_retry ./build/release.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
alter session set "_ORACLE_SCRIPT"=true; | ||
CREATE USER quill_test IDENTIFIED BY "QuillRocks!" QUOTA 50M ON system; | ||
GRANT DBA TO quill_test; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
source /root/.bashrc | ||
|
||
echo "Setting up Oracle" | ||
|
||
until source /root/.bashrc; sqlplus quill_test/QuillRocks! < /oracle_setup/external_match_script.sql; do | ||
echo "Trying Again" | ||
sleep 5; | ||
done | ||
|
||
echo "Oracle Setup Complete" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
select 'match_this_test_to_pass' from DUAL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
|
||
echo "Running Global Oracle Init" | ||
|
||
# Start the oracle database | ||
nohup /entrypoint.sh & | ||
|
||
# Save the pid which we need to wait for (otherwise container will exit) | ||
pid=$! | ||
|
||
echo "Waiting for Oracle Setup to Complete" | ||
|
||
until source /root/.bashrc; sqlplus system/oracle@//localhost:1521/xe < /oracle_setup/external_match_script.sql | grep "match_this_test_to_pass"; do | ||
echo "Trying Again" | ||
sleep 5; | ||
done | ||
|
||
source /root/.bashrc | ||
|
||
echo "Setting Up Test Database" | ||
sqlplus system/oracle@//localhost:1521/xe < /oracle_setup/create_quill_test.sql | ||
|
||
echo "Setting Up Test Database Schema" | ||
sqlplus quill_test/QuillRocks! < /quill_setup/oracle-schema.sql | ||
|
||
echo "Oracle Setup Complete" | ||
|
||
# Wait until oracle DB externally closed | ||
wait $pid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
|
||
# Copy the jdbc jar from the container to local | ||
docker cp "$(docker-compose ps -q oracle)":/u01/app/oracle-product/12.1.0/xe/jdbc/lib/ojdbc7.jar ./ | ||
|
||
mvn install:install-file \ | ||
-Dfile=ojdbc7.jar \ | ||
-DgroupId='com.oracle.jdbc' \ | ||
-DartifactId=ojdbc7 \ | ||
-Dversion=12.1.0.2 \ | ||
-Dpackaging=jar | ||
|
||
rm ojdbc7.jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
quill-jdbc/src/main/scala/io/getquill/OracleJdbcContext.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package io.getquill | ||
|
||
import java.io.Closeable | ||
|
||
import com.typesafe.config.Config | ||
import io.getquill.context.jdbc.{ JdbcContext, OracleJdbcContextBase } | ||
import io.getquill.util.LoadConfig | ||
import javax.sql.DataSource | ||
|
||
class OracleJdbcContext[N <: NamingStrategy](val naming: N, val dataSource: DataSource with Closeable) | ||
extends JdbcContext[OracleDialect, N] | ||
with OracleJdbcContextBase[N] { | ||
|
||
def this(naming: N, config: JdbcContextConfig) = this(naming, config.dataSource) | ||
def this(naming: N, config: Config) = this(naming, JdbcContextConfig(config)) | ||
def this(naming: N, configPrefix: String) = this(naming, LoadConfig(configPrefix)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.