pub struct Connection { /* fields omitted */ }
Connection object.
The connection to the database.
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();
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 ID of the connection.
The ID is set by the server. Can be handy for logging.
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
Formats the value using the given formatter. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static