Struct hdbconnect::Connection[][src]

pub struct Connection { /* fields omitted */ }

Connection object.

The connection to the database.

Example

This example is not tested
use hdbconnect::{Connection, IntoConnectParams};
let params = "hdbsql://my_user:my_passwd@the_host:2222"
    .into_connect_params()
    .unwrap();
let mut connection = Connection::new(params).unwrap();

Methods

impl Connection
[src]

Factory method for authenticated connections.

Sets the connection's auto-commit behavior for future calls.

Returns the connection's auto-commit behavior.

Configures the connection's fetch size for future calls.

Configures the connection's lob read length for future calls.

Configures the connection's lob read length for future calls.

Returns the number of roundtrips to the database that have been done through this connection.

Sets client information into session variables on the server.

Example:

This example is not tested
connection.set_client_info(
    "MyApp",
    "5.3.23",
    "update_customer.rs",
    "K2209657"
)?;

Executes a statement on the database.

This generic method can handle all kinds of calls, and thus has the most complex return type. In many cases it will be more appropriate to use one of the methods query(), dml(), exec(), which have the adequate simple result type you usually want.

Executes a statement and expects a single ResultSet.

Executes a statement and expects a single number of affected rows.

Executes a statement and expects a plain success.

Prepares a statement and returns a handle to it. Note that the handle keeps using the same connection.

Commits the current transaction.

Rolls back the current transaction.

Creates a new connection object with the same settings and authentication.

Utility method to fire a couple of statements, ignoring errors and return values

Utility method to fire a couple of statements, ignoring their return values; the method returns with the first error, or with ()

Returns warnings that were returned from the server since the last call to this method.

Returns an implementation of dist_tx::rm::ResourceManager that is based on this connection.

Tools like debuggers can provide additional information while stepping through a source

Trait Implementations

impl Debug for Connection
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for Connection

impl Sync for Connection