Skip to content

Commit 068d594

Browse files
committed
Update OCPI-C to v5.4.0
1 parent 2a68fd5 commit 068d594

File tree

3 files changed

+161
-4
lines changed

3 files changed

+161
-4
lines changed

ChangeLog.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Fixed Issues:
88

99
Internal Changes:
1010

11-
* Update ODPI-C to 5.3.0. (see [ODPI-C release notes])
11+
* Update ODPI-C from 5.2.0 to 5.4.0. (see [ODPI-C release notes])
1212
* Improve performance of fetching numeric types when number column definition is out of range of i64.
1313
See https://github.com/kubo/rust-oracle/issues/89#issuecomment-2435662861
1414
* Improve performance of fetching number columns by skipping UTF-8 validation
@@ -70,7 +70,7 @@ New features:
7070
Changes:
7171

7272
* Error messages are changed to follow "Error messages are typically concise lowercase sentences without trailing punctuation"
73-
* Update ODPI-C to 5.1.0. (see [ODPI-C release notes])
73+
* Update ODPI-C to 5.2.0. (see [ODPI-C release notes])
7474
* Update minimum supported Rust version to 1.60.0
7575
* Update rust edition to 2021
7676
* Change a undocumented method of the sealed trait [`ColumnIndex`]

src/binding/binding.rs

Lines changed: 158 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* automatically generated by rust-bindgen 0.69.4 */
22

33
pub const DPI_MAJOR_VERSION: u32 = 5;
4-
pub const DPI_MINOR_VERSION: u32 = 3;
4+
pub const DPI_MINOR_VERSION: u32 = 4;
55
pub const DPI_PATCH_LEVEL: u32 = 0;
66
pub const DPI_DEFAULT_FETCH_ARRAY_SIZE: u32 = 100;
77
pub const DPI_DEFAULT_PREFETCH_ROWS: u32 = 2;
@@ -155,6 +155,10 @@ pub const DPI_SODA_FLAGS_INDEX_DROP_FORCE: u32 = 4;
155155
pub const DPI_MODE_STARTUP_DEFAULT: u32 = 0;
156156
pub const DPI_MODE_STARTUP_FORCE: u32 = 1;
157157
pub const DPI_MODE_STARTUP_RESTRICT: u32 = 2;
158+
pub const DPI_SERVER_TYPE_UNKNOWN: u32 = 0;
159+
pub const DPI_SERVER_TYPE_DEDICATED: u32 = 1;
160+
pub const DPI_SERVER_TYPE_SHARED: u32 = 2;
161+
pub const DPI_SERVER_TYPE_POOLED: u32 = 4;
158162
pub const DPI_STMT_TYPE_UNKNOWN: u32 = 0;
159163
pub const DPI_STMT_TYPE_SELECT: u32 = 1;
160164
pub const DPI_STMT_TYPE_UPDATE: u32 = 2;
@@ -215,6 +219,7 @@ pub type dpiPoolGetMode = u8;
215219
pub type dpiPurity = u32;
216220
pub type dpiShutdownMode = u32;
217221
pub type dpiStartupMode = u32;
222+
pub type dpiServerType = u8;
218223
pub type dpiStatementType = u16;
219224
pub type dpiSubscrGroupingClass = u8;
220225
pub type dpiSubscrGroupingType = u8;
@@ -1689,6 +1694,155 @@ impl Default for dpiConnCreateParams {
16891694
}
16901695
#[repr(C)]
16911696
#[derive(Debug, Copy, Clone)]
1697+
pub struct dpiConnInfo {
1698+
pub dbDomain: *const ::std::os::raw::c_char,
1699+
pub dbDomainLength: u32,
1700+
pub dbName: *const ::std::os::raw::c_char,
1701+
pub dbNameLength: u32,
1702+
pub instanceName: *const ::std::os::raw::c_char,
1703+
pub instanceNameLength: u32,
1704+
pub serviceName: *const ::std::os::raw::c_char,
1705+
pub serviceNameLength: u32,
1706+
pub maxIdentifierLength: u32,
1707+
pub maxOpenCursors: u32,
1708+
pub serverType: u8,
1709+
}
1710+
#[test]
1711+
fn bindgen_test_layout_dpiConnInfo() {
1712+
const UNINIT: ::std::mem::MaybeUninit<dpiConnInfo> = ::std::mem::MaybeUninit::uninit();
1713+
let ptr = UNINIT.as_ptr();
1714+
assert_eq!(
1715+
::std::mem::size_of::<dpiConnInfo>(),
1716+
72usize,
1717+
concat!("Size of: ", stringify!(dpiConnInfo))
1718+
);
1719+
assert_eq!(
1720+
::std::mem::align_of::<dpiConnInfo>(),
1721+
8usize,
1722+
concat!("Alignment of ", stringify!(dpiConnInfo))
1723+
);
1724+
assert_eq!(
1725+
unsafe { ::std::ptr::addr_of!((*ptr).dbDomain) as usize - ptr as usize },
1726+
0usize,
1727+
concat!(
1728+
"Offset of field: ",
1729+
stringify!(dpiConnInfo),
1730+
"::",
1731+
stringify!(dbDomain)
1732+
)
1733+
);
1734+
assert_eq!(
1735+
unsafe { ::std::ptr::addr_of!((*ptr).dbDomainLength) as usize - ptr as usize },
1736+
8usize,
1737+
concat!(
1738+
"Offset of field: ",
1739+
stringify!(dpiConnInfo),
1740+
"::",
1741+
stringify!(dbDomainLength)
1742+
)
1743+
);
1744+
assert_eq!(
1745+
unsafe { ::std::ptr::addr_of!((*ptr).dbName) as usize - ptr as usize },
1746+
16usize,
1747+
concat!(
1748+
"Offset of field: ",
1749+
stringify!(dpiConnInfo),
1750+
"::",
1751+
stringify!(dbName)
1752+
)
1753+
);
1754+
assert_eq!(
1755+
unsafe { ::std::ptr::addr_of!((*ptr).dbNameLength) as usize - ptr as usize },
1756+
24usize,
1757+
concat!(
1758+
"Offset of field: ",
1759+
stringify!(dpiConnInfo),
1760+
"::",
1761+
stringify!(dbNameLength)
1762+
)
1763+
);
1764+
assert_eq!(
1765+
unsafe { ::std::ptr::addr_of!((*ptr).instanceName) as usize - ptr as usize },
1766+
32usize,
1767+
concat!(
1768+
"Offset of field: ",
1769+
stringify!(dpiConnInfo),
1770+
"::",
1771+
stringify!(instanceName)
1772+
)
1773+
);
1774+
assert_eq!(
1775+
unsafe { ::std::ptr::addr_of!((*ptr).instanceNameLength) as usize - ptr as usize },
1776+
40usize,
1777+
concat!(
1778+
"Offset of field: ",
1779+
stringify!(dpiConnInfo),
1780+
"::",
1781+
stringify!(instanceNameLength)
1782+
)
1783+
);
1784+
assert_eq!(
1785+
unsafe { ::std::ptr::addr_of!((*ptr).serviceName) as usize - ptr as usize },
1786+
48usize,
1787+
concat!(
1788+
"Offset of field: ",
1789+
stringify!(dpiConnInfo),
1790+
"::",
1791+
stringify!(serviceName)
1792+
)
1793+
);
1794+
assert_eq!(
1795+
unsafe { ::std::ptr::addr_of!((*ptr).serviceNameLength) as usize - ptr as usize },
1796+
56usize,
1797+
concat!(
1798+
"Offset of field: ",
1799+
stringify!(dpiConnInfo),
1800+
"::",
1801+
stringify!(serviceNameLength)
1802+
)
1803+
);
1804+
assert_eq!(
1805+
unsafe { ::std::ptr::addr_of!((*ptr).maxIdentifierLength) as usize - ptr as usize },
1806+
60usize,
1807+
concat!(
1808+
"Offset of field: ",
1809+
stringify!(dpiConnInfo),
1810+
"::",
1811+
stringify!(maxIdentifierLength)
1812+
)
1813+
);
1814+
assert_eq!(
1815+
unsafe { ::std::ptr::addr_of!((*ptr).maxOpenCursors) as usize - ptr as usize },
1816+
64usize,
1817+
concat!(
1818+
"Offset of field: ",
1819+
stringify!(dpiConnInfo),
1820+
"::",
1821+
stringify!(maxOpenCursors)
1822+
)
1823+
);
1824+
assert_eq!(
1825+
unsafe { ::std::ptr::addr_of!((*ptr).serverType) as usize - ptr as usize },
1826+
68usize,
1827+
concat!(
1828+
"Offset of field: ",
1829+
stringify!(dpiConnInfo),
1830+
"::",
1831+
stringify!(serverType)
1832+
)
1833+
);
1834+
}
1835+
impl Default for dpiConnInfo {
1836+
fn default() -> Self {
1837+
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
1838+
unsafe {
1839+
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
1840+
s.assume_init()
1841+
}
1842+
}
1843+
}
1844+
#[repr(C)]
1845+
#[derive(Debug, Copy, Clone)]
16921846
pub struct dpiContextCreateParams {
16931847
pub defaultDriverName: *const ::std::os::raw::c_char,
16941848
pub defaultEncoding: *const ::std::os::raw::c_char,
@@ -4612,6 +4766,9 @@ extern "C" {
46124766
handle: *mut *mut ::std::os::raw::c_void,
46134767
) -> ::std::os::raw::c_int;
46144768
}
4769+
extern "C" {
4770+
pub fn dpiConn_getInfo(conn: *mut dpiConn, info: *mut dpiConnInfo) -> ::std::os::raw::c_int;
4771+
}
46154772
extern "C" {
46164773
pub fn dpiConn_getInstanceName(
46174774
conn: *mut dpiConn,

0 commit comments

Comments
 (0)