Skip to content

Commit

Permalink
Merge pull request #398 from sfu-db/fed_duckdb
Browse files Browse the repository at this point in the history
Expose cpp lib and support iterative interface for arrow destination
  • Loading branch information
wangxiaoying authored Nov 8, 2022
2 parents 2a71405 + 5db2e20 commit bfab671
Show file tree
Hide file tree
Showing 35 changed files with 1,387 additions and 233 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ dist
benchmark.json
docs/_build
connectorx/examples/test.rs
*.duckdb
9 changes: 9 additions & 0 deletions 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 @@
[workspace]
default-members = ["connectorx"]
members = ["connectorx"]
members = ["connectorx", "connectorx-cpp"]

[profile.release]
debug = true
Expand Down
10 changes: 8 additions & 2 deletions Justfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
set dotenv-load := true

build-release:
cargo build --release
cargo build --release --features all

build-debug:
cargo build
cargo build --features all

build-cpp:
cd connectorx-cpp && cargo build

build-cpp-release:
cd connectorx-cpp && cargo build --release

test +ARGS="":
cargo test --features all {{ARGS}} -- --nocapture
Expand Down
32 changes: 32 additions & 0 deletions connectorx-cpp/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[package]
name = "connectorx-cpp"
version = "0.3.1"
edition = "2021"
license = "MIT"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
libc = "0.2"
connectorx = {path = "../connectorx", default-features = false}
arrow = {version = "22", features = ["prettyprint", "ffi"]}

[lib]
crate-type = ["cdylib"]
name = "connectorx_cpp"

[features]
default = ["fptr", "nbstr", "dsts", "srcs", "federation"]
dsts = ["connectorx/dst_arrow", "connectorx/dst_arrow2"]
fptr = ["connectorx/fptr"]
branch = ["connectorx/branch"]
federation = ["connectorx/federation"]
nbstr = []
srcs = [
"connectorx/src_postgres",
"connectorx/src_mysql",
"connectorx/src_sqlite",
"connectorx/src_mssql",
"connectorx/src_oracle",
"connectorx/src_bigquery",
]
Loading

0 comments on commit bfab671

Please sign in to comment.