[][src]Crate hdbconnect

Native rust database driver for SAP HANA(TM).

hdbconnect uses serde_db to simplify the data exchange between application code and the driver, both for input parameters to prepared statements and for results that are returned from the database. There is no need to iterate over a resultset by rows and columns, just assign query results directly to rust structures that fit the data semantics. This approach allows, in contrast to many ORM mapping variants, using the full flexibility of SQL (projection lists, all kinds of joins, unions, etc, etc). Whatever query you need, you just use it, and whatever result structure you need, you just use a corresponding rust structure into which you deserialize the data.

See code examples for an overview.

Re-exports

pub use r2d2;
pub use serde_db;

Modules

code_examples

Code examples for the usage of this database driver.

types

Non-standard types that are used within the HdbValues in a ResultSet.

Structs

ConnectParams

An immutable struct with all information necessary to open a new connection to a HANA database.

ConnectParamsBuilder

A builder for ConnectParams.

Connection

A connection to the database.

ConnectionManager

Implementation of r2d2's ManageConnection interface.

HdbResponse

Represents all possible non-error responses to a database command.

OutputParameters

Describes output parameters, as they can be returned by procedure calls.

ParameterDescriptor

Metadata for a parameter.

PreparedStatement

Allows injection-safe SQL execution and repeated calls of the same statement with different parameters with as few roundtrips as possible.

ResultSet

The result of a database query.

ResultSetMetadata

Metadata for the fields in a result set.

Row

A single line of a ResultSet, consisting of the contained HdbValues and a reference to the metadata.

ServerError

Describes an error that is reported from the database.

Enums

ExecutionResult

Describes the success of a command.

HdbError

Represents all possible errors that can occur in hdbconnect.

HdbReturnValue

An enum that describes a single database return value.

HdbValue

Enum for all supported database value types.

ParameterBinding

Describes whether a parameter is Nullable or not or if it has a default value.

ParameterDirection

Describes whether a parameter is used for input, output, or both.

ServerCerts

Expresses where Server Certificates are read from.

Severity

Severity of a server message

TypeId

ID of the value type of a database column or a parameter.

Traits

IntoConnectParams

A trait implemented by types that can be converted into a ConnectParams.

Type Definitions

HdbResult

Abbreviation of Result<T, HdbError>.