pub struct ConnectParams { /* fields omitted */ }
An immutable struct with all information necessary to open a new connection
to a HANA database.
An instance of ConnectParams
can be created in various ways:
- using the builder
- using an implementation of
IntoConnectParams
- implementations are provided for URLs that are represented as
String
or as Url
- the shortcut
ConnectParams::from_file
reads the URL from a file
The URL is supposed to have the form
<scheme>://<username>:<password>@<host>:<port>[<options>]
where
<scheme>
= hdbsql
| hdbsqls
<username>
= the name of the DB user to log on
<password>
= the password of the DB user
<host>
= the host where HANA can be found
<port>
= the port at which HANA can be found on <host>
<options>
= ?<key> = <value> [{&<key> = <value>}]
Special option keys are:
client_locale
: <value>
is used to specify the client's locale
client_locale_from_env
: if <value>
is 1, the client's locale is read
from the environment variabe LANG
tls_certificate_dir
: the <value>
points to a folder with pem files that contain
the server's certificates; all pem files in that folder are evaluated
tls_certificate_env
: the <value>
denotes the environment variable that contains
the server's certificate
The client locale is used in language-dependent handling within the SAP HANA
database calculation engine.
If you want to provide the server certificate directly, then
use hdbconnect::IntoConnectParams;
let conn_params = "hdbsql://my_user:my_passwd@the_host:2222"
.into_connect_params()
.unwrap();
Returns a new builder for ConnectParams.
Reads a url from the given file and converts it into ConnectParams
.
Whether TLS or a plain TCP connection is to be used.
Options to be passed to HANA.
Converts the value of self
into a ConnectParams
.
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. 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
🔬 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
)
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static