pub struct Version { /* private fields */ }
Expand description
Oracle version information
Examples
let conn = Connection::connect("scott", "tiger", "")?;
let client_version = Version::client()?;
let (server_version, _) = conn.server_version()?;
println!("Client version:");
println!(" 1st part: {}", client_version.major());
println!(" 2nd part: {}", client_version.minor());
println!(" 3rd part: {}", client_version.update());
println!(" 4th part: {}", client_version.patch());
println!(" 5th part: {}", client_version.port_update());
println!("Server version: {}", server_version);
Implementations§
source§impl Version
impl Version
sourcepub const fn new(
major: i32,
minor: i32,
update: i32,
patch: i32,
port_update: i32
) -> Version
pub const fn new(
major: i32,
minor: i32,
update: i32,
patch: i32,
port_update: i32
) -> Version
Creates a new version information
sourcepub fn client() -> Result<Version>
pub fn client() -> Result<Version>
Returns the version of Oracle client in use.
Examples
let client_ver = Version::client()?;
println!("Oracle Client Version: {}", client_ver);
sourcepub fn port_update(&self) -> i32
pub fn port_update(&self) -> i32
Gets 5th part of Oracle version number
Trait Implementations§
source§impl Ord for Version
impl Ord for Version
source§impl PartialEq<Version> for Version
impl PartialEq<Version> for Version
source§impl PartialOrd<Version> for Version
impl PartialOrd<Version> for Version
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more