1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
//! Experimental Rust client for OrientDB. //! The driver supports sync and async. //! //! //! You can use orientdb-client this lines in your `Cargo.toml` //! //! ```toml //! [dependencies] //! orientdb-client = "*" //! ``` //! //! Here it is an usage example: //! //! ```rust,no_run //! //! use orientdb_client::{OrientDB}; //! //! fn main() -> Result<(), Box<std::error::Error>> { //! let client = OrientDB::connect(("localhost",2424))?; //! //! let session = client.session("demodb","admin","admin")?; //! //! let results : Vec<_> = session.query("select from V where id = :param").named(&[("param", &1)]).run()?.collect(); //! //! //! println!("{:?}", results); //! //! Ok(()) //!} //! //! //! ``` //! pub mod common; pub mod sync; #[cfg(feature = "async")] pub mod asynchronous; pub use common::types::error::OrientError; pub use sync::client::OrientDB; pub use sync::session::{OSession, SessionPool}; pub type OrientResult<T> = Result<T, OrientError>; pub use common::DatabaseType; pub mod types { pub use super::common::types::*; } #[cfg(feature = "async")] pub mod aio { pub use crate::asynchronous::session::{OSession, SessionPool}; pub use crate::asynchronous::OrientDB; }