Skip to content

Commit 3cad946

Browse files
committed
documentation
1 parent 6ceeb81 commit 3cad946

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@ jobs:
2424
- os: windows-latest
2525
binary_extension: .exe
2626
target: x86_64-pc-windows-msvc
27+
features: ""
2728
- os: macos-latest
2829
target: x86_64-apple-darwin
30+
features: "odbc-static"
2931
steps:
3032
- uses: actions/checkout@v4
3133
- name: Install Rust toolchain
@@ -35,7 +37,7 @@ jobs:
3537
- name: Set up cargo cache
3638
uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6
3739
- name: Build
38-
run: cargo build --profile superoptimized --locked --target ${{ matrix.target }}
40+
run: cargo build --profile superoptimized --locked --target ${{ matrix.target }} --features "${{ matrix.features }}"
3941
- name: Upload unsigned Windows artifact
4042
if: matrix.os == 'windows-latest'
4143
id: upload_unsigned
@@ -90,7 +92,7 @@ jobs:
9092
- name: Set up cargo cache
9193
uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6
9294
- name: Build
93-
run: cargo build --profile superoptimized --locked --target x86_64-unknown-linux-gnu --all-features
95+
run: cargo build --profile superoptimized --locked --target x86_64-unknown-linux-gnu --features "odbc-static"
9496
- uses: actions/upload-artifact@v4
9597
with:
9698
name: sqlpage ubuntu-latest

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,9 @@ You can skip this section if you want to use one of the built-in database driver
190190
191191
SQLPage supports ODBC connections to connect to databases that don't have native drivers, such as Oracle, Snowflake, BigQuery, IBM DB2, and many others.
192192

193-
On Linux, SQLPage supports both dynamic and static ODBC linking. The Docker image uses the system `unixODBC` (dynamic). Release binaries can be built with static ODBC linking by enabling the `odbc-static` feature. You still need to install or provide the database-specific ODBC driver for the database you want to connect to. SQLPage also searches for drivers in a `sqlpage/` directory placed next to the executable (rpath includes `$ORIGIN/sqlpage`).
193+
On Linux, SQLPage supports both dynamic and static ODBC linking. The Docker image uses the system `unixODBC` (dynamic).
194+
Linux and MacOS release binaries are built with a statically linked unixODBC.
195+
You still need to install or provide the database-specific ODBC driver for the database you want to connect to.
194196

195197
#### Install ODBC
196198

@@ -207,7 +209,9 @@ On Linux, SQLPage supports both dynamic and static ODBC linking. The Docker imag
207209
208210
#### Connect to your database
209211
210-
- Find your [connection string](https://www.connectionstrings.com/). It will look like this: `Driver={SnowflakeDSIIDriver};Server=xyz.snowflakecomputing.com;Database=MY_DB;Schema=PUBLIC;UID=my_user;PWD=my_password`
212+
- Find your [connection string](https://www.connectionstrings.com/).
213+
- It will look like this: `Driver=/opt/snowflake_odbc/lib/libSnowflake.so;Server=xyz.snowflakecomputing.com;Database=MY_DB;Schema=PUBLIC;UID=my_user;PWD=my_password`
214+
- It must reference the path to the database driver you installed earlier, plus any connection parameter required by the driver itself. Follow the instructions from the driver's own documentation.
211215
- Use it in the [DATABASE_URL configuration option](./configuration.md)
212216

213217

0 commit comments

Comments
 (0)