Skip to content

Commit 193c3ea

Browse files
committed
wip
1 parent 2f34ef7 commit 193c3ea

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

src/arrow.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
use pyo3::prelude::*;
2+
use pyo3_arrow::PyTable;
3+
4+
#[pyfunction]
5+
pub fn from_arrow(table: &Bound<PyTable>) -> () {
6+
dbg!(table);
7+
todo!()
8+
}

src/duckdb.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use crate::Result;
22
use pyo3::{
33
exceptions::PyException,
44
prelude::*,
5-
types::{PyCapsule, PyDict, PyList},
5+
types::{PyDict, PyList},
66
IntoPyObjectExt,
77
};
88
use pyo3_arrow::PyTable;
@@ -134,9 +134,3 @@ impl DuckdbClient {
134134
Ok(collections)
135135
}
136136
}
137-
138-
// TODO this probably should live in a different mod
139-
#[pyfunction]
140-
pub fn from_arrow(table: &Bound<PyCapsule>) -> () {
141-
todo!()
142-
}

src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#![deny(unused_crate_dependencies)]
22

3+
mod arrow;
34
mod cli;
45
mod duckdb;
56
mod error;
@@ -20,11 +21,11 @@ fn stacrs(py: Python<'_>, m: &Bound<'_, PyModule>) -> PyResult<()> {
2021

2122
m.add_class::<duckdb::DuckdbClient>()?;
2223

24+
m.add_function(wrap_pyfunction!(arrow::from_arrow, m)?)?;
2325
m.add_function(wrap_pyfunction!(cli::main, m)?)?;
2426
m.add_function(wrap_pyfunction!(migrate::migrate, m)?)?;
2527
m.add_function(wrap_pyfunction!(migrate::migrate_href, m)?)?;
2628
m.add_function(wrap_pyfunction!(read::read, m)?)?;
27-
m.add_function(wrap_pyfunction!(duckdb::from_arrow, m)?)?;
2829
m.add_function(wrap_pyfunction!(search::search, m)?)?;
2930
m.add_function(wrap_pyfunction!(search::search_to, m)?)?;
3031
m.add_function(wrap_pyfunction!(version::version, m)?)?;

0 commit comments

Comments
 (0)