Skip to content

Commit ae2d839

Browse files
committed
Doc tweak
1 parent 8014e35 commit ae2d839

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,9 @@ Rust-oracle and ODPI-C bundled in rust-oracle are under the terms of:
264264
1. [the Universal Permissive License v 1.0 or at your option, any later version](http://oss.oracle.com/licenses/upl); and/or
265265
2. [the Apache License v 2.0](http://www.apache.org/licenses/LICENSE-2.0).
266266

267+
Some of doc comments were copied from ODPI-C documentation verbatim.
268+
Oracle and/or its affiliates hold the copyright of the parts.
269+
267270
[Rust]: https://www.rust-lang.org/
268271
[ODPI-C]: https://oracle.github.io/odpi/
269272
[ODPI-C installation document]: https://oracle.github.io/odpi/doc/installation.html

src/conn.rs

+8
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,17 @@ pub struct Info {
102102
pub db_domain: String,
103103

104104
/// The Oracle Database name associated with the connection
105+
///
106+
/// This is the same value returned by the SQL expression
107+
/// `SELECT NAME FROM V$DATABASE`.
108+
/// Note the values may have different cases.
105109
pub db_name: String,
106110

107111
/// The Oracle Database instance name associated with the connection
112+
///
113+
/// This is the same value returned by the SQL expression
114+
/// `SELECT SYS_CONTEXT('USERENV', 'INSTANCE_NAME') FROM DUAL`.
115+
/// Note the values may have different cases.
108116
pub instance_name: String,
109117

110118
/// The Oracle Database service name associated with the connection

src/connection.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1749,6 +1749,8 @@ impl Connection {
17491749
/// # use oracle::test_util;
17501750
/// # let conn = test_util::connect()?;
17511751
/// let info = conn.info()?;
1752+
/// let instance_name = conn.query_row_as::<String>("SELECT SYS_CONTEXT('USERENV', 'INSTANCE_NAME') FROM DUAL", &[])?;
1753+
/// assert!(info.instance_name.eq_ignore_ascii_case(&instance_name));
17521754
/// let service_name = conn.query_row_as::<String>("SELECT SYS_CONTEXT('USERENV', 'SERVICE_NAME') FROM DUAL", &[])?;
17531755
/// assert_eq!(info.service_name, service_name);
17541756
/// # Ok::<(), Error>(())

0 commit comments

Comments
 (0)