Struct hdbconnect::Connection [] [src]

pub struct Connection { /* fields omitted */ }

Connection object.

The connection to the database. You get started with something like this:

use hdbconnect::Connection;
let mut connection = Connection::new("mymachine", "30415")?;
connection.authenticate_user_password("Annidda", "BF1äÖkn&nG")?;

The most important attributes of a connection, including the TcpStream, are "outsourced" into a ConnectionCore object, which is kept alive through ref-counted references, from this connection object and / or from other objects that are created by this connection object and have their independent lifetime.

Methods

impl Connection
[src]

Creates a new connection object that is already connected to the specified host/port

Authenticates with username and password

Returns the HANA's product version info.

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

Configures the connection's fetch size 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.

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_statement(), dml_statement(), exec_statement(), 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 ()

Trait Implementations

impl Debug for Connection
[src]

Formats the value using the given formatter.