Skip to content

Commit

Permalink
allow specifying odbc connection string via env
Browse files Browse the repository at this point in the history
  • Loading branch information
pacman82 committed Sep 7, 2022
1 parent 805d4c6 commit e29d9f0
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "odbc2parquet"
version = "0.12.0"
version = "0.12.1"
authors = ["Markus Klein"]
edition = "2021"
repository = "https://github.com/pacman82/odbc2parquet"
Expand Down
4 changes: 4 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 0.12.1

* Allow specifying ODBC connection string via environment variable `ODBC_CONNECTION_STRING` instead of `--connection_string` option.

## 0.12.0

* Pad suffixes `_01` with leading zeroes to make the file names more friendly for lexical sorting if splitting fetch output. Number is padded to two digits by default.
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ struct ConnectOpts {
prompt: bool,
/// The connection string used to connect to the ODBC data source. Alternatively you may specify
/// the ODBC dsn.
#[clap(long, short = 'c')]
#[clap(long, short = 'c', env = "ODBC_CONNECTION_STRING")]
connection_string: Option<String>,
/// ODBC Data Source Name. Either this or the connection string must be specified to identify
/// the datasource. Data source name (dsn) and connection string, may not be specified both.
Expand Down
1 change: 1 addition & 0 deletions tests/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,7 @@ fn query_timestamp_with_timezone_mssql() {
// Setup table for test
let table_name = "QueryTimestampWithTimezoneMssql";
let conn = ENV.connect_with_connection_string(MSSQL).unwrap();
// ODBC data type: SqlDataType(-155), column_size: 34, decimal_digits: 7
setup_empty_table(&conn, table_name, &["DATETIMEOFFSET"]).unwrap();
let insert = format!(
"INSERT INTO {}
Expand Down

0 comments on commit e29d9f0

Please sign in to comment.