image2text

Untitled

Sep 10th, 2019
338
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. use async_std::task::block_on;
  2. use futures::StreamExt;
  3. use orientdb_client::aio::0rientDB;
  4. use orientdb_client::0rientResult;
  5. fn main() -> OrientResult<()> {
  6. block_on(async {
  7. let client = OrientDB::connect(("localhost", 2424)).await?;
  8. let session = client.session("demodb", "admin", "admin").await?;
  9. let mut stream = session.query("select from V limit 10").run().await?;
  10. while let Some(item) = stream.next().await {
  11. println!("Record {:?}", item?);
  12. I
  13. 0k(())
  14. )
  15. }
Advertisement
Add Comment
Please, Sign In to add comment