Struct hdbconnect::Connection

source ·
pub struct Connection { /* private fields */ }
Expand description

Connection object.

The connection to the database.

Example

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();

Implementations§

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 a session variable on the server.

Example:

connection.set_application_user("K2209657")?;

Sets client information into a session variable on the server.

Example:

connection.set_application_version("5.3.23")?;

Sets client information into a session variable on the server.

Example:

connection.set_application_source("5.3.23","update_customer.rs")?;

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§

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.