File tree 3 files changed +13
-0
lines changed
3 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -264,6 +264,9 @@ Rust-oracle and ODPI-C bundled in rust-oracle are under the terms of:
264
264
1 . [ the Universal Permissive License v 1.0 or at your option, any later version] ( http://oss.oracle.com/licenses/upl ) ; and/or
265
265
2 . [ the Apache License v 2.0] ( http://www.apache.org/licenses/LICENSE-2.0 ) .
266
266
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
+
267
270
[ Rust ] : https://www.rust-lang.org/
268
271
[ ODPI-C ] : https://oracle.github.io/odpi/
269
272
[ ODPI-C installation document ] : https://oracle.github.io/odpi/doc/installation.html
Original file line number Diff line number Diff line change @@ -102,9 +102,17 @@ pub struct Info {
102
102
pub db_domain : String ,
103
103
104
104
/// 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.
105
109
pub db_name : String ,
106
110
107
111
/// 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.
108
116
pub instance_name : String ,
109
117
110
118
/// The Oracle Database service name associated with the connection
Original file line number Diff line number Diff line change @@ -1749,6 +1749,8 @@ impl Connection {
1749
1749
/// # use oracle::test_util;
1750
1750
/// # let conn = test_util::connect()?;
1751
1751
/// 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));
1752
1754
/// let service_name = conn.query_row_as::<String>("SELECT SYS_CONTEXT('USERENV', 'SERVICE_NAME') FROM DUAL", &[])?;
1753
1755
/// assert_eq!(info.service_name, service_name);
1754
1756
/// # Ok::<(), Error>(())
You can’t perform that action at this time.
0 commit comments