8000 testing by detule · Pull Request #53 · detule/odbc · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

testing #53

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 10 commits into
base: main
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
8000
2 changes: 2 additions & 0 deletions .github/odbc/install-oracle-driver.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
sudo apt-get install -y libaio-dev
sudo ln -s /lib/x86_64-linux-gnu/libaio.so /lib/x86_64-linux-gnu/libaio.so.1
mkdir -p /opt/oracle
wget --quiet -O /opt/oracle/instantclient-basic-linux.x64-21.12.0.0.0dbru.zip https://download.oracle.com/otn_software/linux/instantclient/2112000/instantclient-basic-linux.x64-21.12.0.0.0dbru.zip
wget --quiet -O /opt/oracle/instantclient-odbc-linux.x64-21.12.0.0.0dbru.zip https://download.oracle.com/otn_software/linux/instantclient/2112000/instantclient-odbc-linux.x64-21.12.0.0.0dbru.zip
Expand Down
5 changes: 3 additions & 2 deletions .github/odbc/odbc.ini
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,10 @@ Database = /tmp/test
Timeout = 2000

[MicrosoftSQLServer]
Driver = ODBC Driver 17 for SQL Server
Server = localhost
Driver = ODBC Driver 18 for SQL Server
Server = 127.0.0.1
Port = 1433
Encrypt = no

[ProMicrosoftSQLServer]
Driver = /home/runner/work/odbc/odbc/.github/odbc/pro_drivers/sql_server/bin/lib/libsqlserverodbc_sb64.so
Expand Down
6 changes: 3 additions & 3 deletions .github/odbc/odbcinst.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ Threading=2
[SQLite Driver]
Driver=/usr/lib/x86_64-linux-gnu/odbc/libsqlite3odbc.so

[ODBC Driver 17 for SQL Server]
Description=Microsoft ODBC Driver 17 for SQL Server
Driver=/opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.so
[ODBC Driver 18 for SQL Server]
Description=Microsoft ODBC Driver 18 for SQL Server
Driver=/opt/microsoft/msodbcsql18/lib64/libmsodbcsql-18.so
UsageCount=1

[Oracle 21 ODBC driver]
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ jobs:
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
ODBCSYSINI: ${{ github.workspace }}/.github/odbc

steps:
- uses: actions/checkout@v4
Expand All @@ -52,15 +53,20 @@ jobs:
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- name: Install Driver Manager (Ubuntu)
if: matrix.config.os == 'ubuntu-latest'
run: sudo apt-get install -y unixodbc-dev

- name: Install Driver Manager (MacOS)
if: matrix.config.os == 'macOS-latest'
# unixODBC is not pre-installed on macos-14-arm64 runner (#794)
run: brew install unixodbc

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
needs: check

- name: Install unixODBC
if: matrix.config.os == 'macOS-latest'
# unixODBC is not pre-installed on macos-14-arm64 runner (#794)
run: brew install unixodbc

- uses: r-lib/actions/check-r-package@v2
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/db-pro.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ jobs:

- uses: r-lib/actions/setup-r@v2

- name: Install Driver Manager
run: sudo apt-get install -y unixodbc-dev

- name: Install MySQL Driver
run: |
sudo systemctl start mysql.service
Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/db.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ jobs:
POSTGRES_DB: test
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
sqlserver:
image: mcr.microsoft.com/mssql/server:2017-latest-ubuntu
image: mcr.microsoft.com/mssql/server:2019-latest
ports:
- 1433:1433
env:
ACCEPT_EULA: Y
SA_PASSWORD: Password12

env:
CRAN: "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest"
CRAN: "https://packagemanager.rstudio.com/cran/__linux__/noble/latest"
ODBCSYSINI: ${{ github.workspace }}/.github/odbc
TNS_ADMIN: ${{ github.workspace }}/.github/odbc
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -58,6 +58,9 @@ jobs:

- uses: r-lib/actions/setup-r@v2

- name: Install Driver Manager
run: sudo apt-get install -y unixodbc-dev

- name: Install MySQL Driver
run: |
sudo systemctl start mysql.service
Expand All @@ -79,11 +82,12 @@ jobs:
run: |
echo "ODBC_CS_SQLSERVER=dsn=MicrosoftSQLServer;UID=SA;PWD=Password12" >> $GITHUB_ENV
sudo bash -c "
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \
&& curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list > /etc/apt/sources.list.d/mssql-release.list \
rm -f /usr/share/keyrings/microsoft-prod.gpg \
&& curl https://packages.microsoft.com/keys/microsoft.asc | gpg --batch --dearmor --no-tty -o /usr/share/keyrings/microsoft-prod.gpg \
&& curl https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/prod.list | tee /etc/apt/sources.list.d/mssql-release.list \
&& apt-get update \
&& ACCEPT_EULA=Y apt-get install -y msodbcsql17 \
&& ln -s /opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.*.so.* /opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.so"
&& ACCEPT_EULA=Y apt-get install -y msodbcsql18 \
&& ln -s /opt/microsoft/msodbcsql18/lib64/libmsodbcsql-18.*.so.* /opt/microsoft/msodbcsql18/lib64/libmsodbcsql-18.so"

- name: Install Oracle Driver
run: |
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
ODBCSYSINI: ${{ github.workspace }}/.github/odbc

steps:
- uses: actions/checkout@v4
Expand All @@ -23,6 +24,9 @@ jobs:
with:
use-public-rspm: true

- name: Install Driver Manager
run: sudo apt-get install -y unixodbc-dev

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::covr, any::xml2
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ exportClasses(PostgreSQL)
exportClasses(Redshift)
exportClasses(SQLite)
exportClasses(Snowflake)
exportClasses(SnowflakeOdbcDriver)
exportClasses(Teradata)
exportMethods(dbAppendTable)
exportMethods(dbBegin)
Expand Down
8 changes: 6 additions & 2 deletions R/driver-snowflake.R
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,17 @@ setMethod("odbcDataType", "Snowflake",
#' }
#' @export
snowflake <- function() {
new("Snowflake")
new("SnowflakeOdbcDriver")
}

#' @rdname snowflake
#' @export
setClass("SnowflakeOdbcDriver", contains = "OdbcDriver")

#' @rdname snowflake
#' @export
setMethod(
"dbConnect", "Snowflake",
"dbConnect", "SnowflakeOdbcDriver",
function(drv,
account = Sys.getenv("SNOWFLAKE_ACCOUNT"),
driver = NULL,
Expand Down
6 changes: 4 additions & 2 deletions man/snowflake.Rd

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

Loading
0