-
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
f12f1cd
commit c5adb22
Showing
39 changed files
with
1,247 additions
and
46 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
22 changes: 22 additions & 0 deletions
22
quill-jdbc-monix/src/main/scala/io/getquill/OracleMonixJdbcContext.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,22 @@ | ||
package io.getquill | ||
|
||
import java.io.Closeable | ||
|
||
import com.typesafe.config.Config | ||
import io.getquill.context.jdbc.OracleJdbcContextBase | ||
import io.getquill.context.monix.{ MonixJdbcContext, Runner } | ||
import io.getquill.util.LoadConfig | ||
import javax.sql.DataSource | ||
|
||
class OracleMonixJdbcContext[N <: NamingStrategy]( | ||
val naming: N, | ||
dataSource: DataSource with Closeable, | ||
runner: Runner | ||
) extends MonixJdbcContext[OracleDialect, N](dataSource, runner) | ||
with OracleJdbcContextBase[N] { | ||
|
||
def this(naming: N, config: JdbcContextConfig, runner: Runner) = this(naming, config.dataSource, runner) | ||
def this(naming: N, config: Config, runner: Runner) = this(naming, JdbcContextConfig(config), runner) | ||
def this(naming: N, configPrefix: String, runner: Runner) = this(naming, LoadConfig(configPrefix), runner) | ||
def this(naming: N, configPrefix: String) = this(naming, LoadConfig(configPrefix), Runner.default) | ||
} |
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.