Skip to content

Commit e77677d

Browse files
committed
fix rust doc
1 parent 7c67a57 commit e77677d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

connectorx/src/lib.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,11 @@
105105
//!
106106
//! ```no_run
107107
//! use connectorx::prelude::*;
108+
//! use std::convert::TryFrom;
108109
//!
109-
//! let mut source_conn = SourceConn::try_from("postgresql://username:password@host:port/db?cxprotocol=binary");
110-
//! let queries = &["SELECT * FROM table WHERE id < 100", "SELECT * FROM table WHERE id >= 100"];
111-
//! let destination = get_arrow(source_conn, Some("SELECT * FROM table"), queries).expect("run failed");
110+
//! let mut source_conn = SourceConn::try_from("postgresql://username:password@host:port/db?cxprotocol=binary").expect("parse conn str failed");
111+
//! let queries = &[CXQuery::from("SELECT * FROM table WHERE id < 100"), CXQuery::from("SELECT * FROM table WHERE id >= 100")];
112+
//! let destination = get_arrow(&source_conn, None, queries).expect("run failed");
112113
//!
113114
//! let data = destination.arrow();
114115
//! ```
@@ -194,6 +195,7 @@ pub mod prelude {
194195
#[cfg(feature = "src_sqlite")]
195196
pub use crate::sources::sqlite::SQLiteSource;
196197
pub use crate::sources::{PartitionParser, Produce, Source, SourcePartition};
198+
pub use crate::sql::CXQuery;
197199
pub use crate::transports::*;
198200
pub use crate::typesystem::{
199201
ParameterizedFunc, ParameterizedOn, Realize, Transport, TypeAssoc, TypeConversion,

0 commit comments

Comments
 (0)