Crate hdbconnect[][src]

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.

Disclaimer

This driver is functionally operable and working well and fast. However, its implementation still lacks some features: some date/time/timestamp datatypes are missing, SSL is not yet supported.

Modules

code_examples

Code examples for the usage of this database driver.

type_id

Constants for the IDs of the data types being used by HANA.

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

Connection object.

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

Contains the result of a database read command, including the describing metadata.

ResultSetMetadata

Metadata for the fields in a result set.

Row

A generic implementation of a single line of a ResultSet.

ServerError

Describes an error that is reported from the database.

Enums

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.

Severity

Severity of a server message

Traits

IntoConnectParams

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

Type Definitions

HdbResult

Abbreviation of Result<T, HdbError>.