[][src]Struct siodb::SiodbConn

pub struct SiodbConn { /* fields omitted */ }

A connection to Siodb.

For example:

  let uri = "siodbs://root@localhost:50000?identity_file=/home/siodb/.ssh/id_rsa";
  let mut siodb_conn = SiodbConn::new(&uri).expect(&format!("Error connecting to URI '{}'", uri));

Implementations

impl SiodbConn[src]

pub fn new(uri_str: &str) -> Result<SiodbConn, DriverError>[src]

Create a new authenticated connection to Siodb from an URI.

pub fn close(&mut self) -> Result<(), DriverError>[src]

Close the connection with Siodb.

pub fn execute(&mut self, sql: String) -> Result<(), DriverError>[src]

Execute a statement in a connection.

pub fn query_row(&mut self, sql: String) -> Option<Vec<Option<Value>>>[src]

Execute a query in a connection, return the first row and discard the others.

pub fn query(&mut self, sql: String) -> Result<(), DriverError>[src]

Execute a query in a connection.

pub fn next(&mut self) -> Result<bool, DriverError>[src]

Read the next row from the result set.

pub fn scan(&self) -> &Vec<Option<Value>>[src]

Return last row fetched from next().

pub fn get_row_count(&mut self) -> u64[src]

Return the total number of rows read to far from next().

pub fn get_affected_row_count(&mut self) -> u64[src]

Return the number of affected rows from the previous statement.

Trait Implementations

impl Debug for SiodbConn[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,