Skip to content

Commit

Permalink
feat: tiberius initial support
Browse files Browse the repository at this point in the history
  • Loading branch information
aljazerzen committed Mar 21, 2024
1 parent 4148cb2 commit 9bc49f6
Show file tree
Hide file tree
Showing 12 changed files with 614 additions and 36 deletions.
190 changes: 188 additions & 2 deletions Cargo.lock

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

5 changes: 3 additions & 2 deletions Justfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export POSTGRES_URL := "postgres://root:root@localhost:5432/dummy"
export MYSQL_URL := "mysql://root:root@localhost:3306/dummy"
export POSTGRES_URL := "postgres://user:pass@localhost:5432/db"
export MYSQL_URL := "mysql://root:pass@localhost:3306/db"
export TIBERIUS_URL := "tds://sa:passwordA1@localhost:1433"

default:
just --list
Expand Down
48 changes: 24 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,30 +30,30 @@ without need for dynamic linking of C libraries.

## Support matrix

| | SQLite | DuckDB | PostgreSQL | MySQL |
| --- | --- | --- | --- | --- |
| feature | `src_sqlite` | `src_duckdb` | `src_postgres` | `src_mysql` |
| dependency | [rusqlite](https://crates.io/crates/rusqlite) | [duckdb](https://crates.io/crates/duckdb) | [postgres](https://crates.io/crates/postgres) | [mysql](https://crates.io/crates/mysql) |
| query | x | x | x | x |
| query params | | | x | |
| schema get | x | x | x | |
| schema edit | x | x | x | |
| append | x | x | x | |
| roundtrip: null & bool | x | x | x | |
| roundtrip: int | x | x | x | |
| roundtrip: uint | x | x | x | |
| roundtrip: float | x | x | x | |
| roundtrip: decimal | x | | x | |
| roundtrip: timestamp | x | x | x | |
| roundtrip: date | x | | x | |
| roundtrip: time | x | | x | |
| roundtrip: duration | x | | x | |
| roundtrip: interval | | | | |
| roundtrip: utf8 | x | x | x | |
| roundtrip: binary | x | x | x | |
| roundtrip: empty | | x | x | |
| containers | | | | |
| binary fallback | x | | x | |
| | SQLite | DuckDB | PostgreSQL | MySQL | Microsoft SQL Server |
| --- | --- | --- | --- | --- | --- |
| feature | `src_sqlite` | `src_duckdb` | `src_postgres` | `src_mysql` | `src_tiberius` |
| dependency | [rusqlite](https://crates.io/crates/rusqlite) | [duckdb](https://crates.io/crates/duckdb) | [postgres](https://crates.io/crates/postgres) | [mysql](https://crates.io/crates/mysql) | [tiberius](https://crates.io/crates/tiberius) |
| query | x | x | x | x | x |
| query params | | | x | | |
| schema get | x | x | x | | |
| schema edit | x | x | x | | |
| append | x | x | x | | |
| roundtrip: null & bool | x | x | x | | |
| roundtrip: int | x | x | x | | |
| roundtrip: uint | x | x | x | | |
| roundtrip: float | x | x | x | | |
| roundtrip: decimal | x | | x | | |
| roundtrip: timestamp | x | x | x | | |
| roundtrip: date | x | | x | | |
| roundtrip: time | x | | x | | |
| roundtrip: duration | x | | x | | |
| roundtrip: interval | | | | | |
| roundtrip: utf8 | x | x | x | | |
| roundtrip: binary | x | x | x | | |
| roundtrip: empty | | x | x | | |
| containers | | | | | |
| binary fallback | x | | x | | |

None of the sources are enabled by default, use features to enable them.

Expand Down
12 changes: 11 additions & 1 deletion connector_arrow/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ byteorder = { version = "1", optional = true }
regex = "1.10.3"
once_cell = "1.19.0"
pac_cell = { git = "https://github.com/aljazerzen/pac_cell.git", optional = true }
tokio = { version = "1.36.0", optional = true }
tokio-util = { version = "0.7.10", optional = true, features = ["compat"]}
futures = { version = "0.3.30", optional = true }

[dependencies.postgres]
version = "0.19"
Expand Down Expand Up @@ -61,6 +64,11 @@ default-features = false
optional = true
features = ["minimal"]

[dependencies.tiberius]
version = "0.12.2"
default-features = false
optional = true

[dev-dependencies]
env_logger = "0.11"
arrow = { version = "49", features = ["prettyprint"], default-features = false }
Expand All @@ -69,10 +77,11 @@ half = "2.3.1"
rand = { version = "0.8.5", default-features = false }
rand_chacha = "0.3.1"
rstest = { version = "0.18.2", default-features = false }
url = "2.5.0"


[features]
all = ["src_sqlite", "src_duckdb", "src_postgres", "src_mysql"]
all = ["src_sqlite", "src_duckdb", "src_postgres", "src_mysql", "src_tiberius"]
src_postgres = [
"postgres",
"postgres-protocol",
Expand All @@ -85,6 +94,7 @@ src_postgres = [
src_sqlite = ["rusqlite"]
src_duckdb = ["duckdb", "fallible-streaming-iterator"]
src_mysql = ["mysql", "pac_cell"]
src_tiberius = ["tiberius", "tokio", "tokio-util", "futures"]

[package.metadata.docs.rs]
features = ["all"]
Loading

0 comments on commit 9bc49f6

Please sign in to comment.