Crate hdbconnect [] [src]

Experimental native rust database driver for SAP HANA(TM).

This crate uses serde and compiles with rust stable as of version 1.15.

The reason for publishing this driver in its immature state is to demonstrate how serde can be used to simplify the API of such a database driver.

Concretely, we use serde to simplify the data exchange between your code and the driver, both for input parameters to prepared statements and for results that you get from the database: there is no need to iterate over a complex resultset by rows and columns!

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.

Modules

code_examples

Here are some code examples for the usage of this database driver.

metadata

Types for describing metadata.

types

Types that are used within the content part of 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
PreparedStatement

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

ResultSet

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

Row

A generic implementation of a single line of a ResultSet.

Enums

HdbError

Represents all possible errors that can occur in hdbconnect.

HdbResponse

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

HdbReturnValue

An enum that describes a single database return value.

HdbValue

Enum for all supported database value types.

Traits

IntoConnectParams

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

Type Definitions

HdbResult

An abbreviation of Result<T, HdbError>.