[−][src]Enum quaint::prelude::ConnectionInfo
General information about a SQL connection.
Variants
Postgres(PostgresUrl)
A PostgreSQL connection URL.
Mysql(MysqlUrl)
A MySQL connection URL.
A SQLite connection URL.
Fields of Sqlite
Methods
impl ConnectionInfo
[src]
pub fn from_url(url_str: &str) -> Result<Self>
[src]
Parse ConnectionInfo
out from an SQL connection string.
Will fail if URI is invalid or the scheme points to an unsupported database.
pub fn dbname(&self) -> Option<&str>
[src]
The provided database name. This will be None
on SQLite.
pub fn schema_name(&self) -> &str
[src]
This is what item names are prefixed with in queries.
- In SQLite, this is the schema name that the database file was attached as.
- In Postgres, it is the selected schema inside the current database.
- In MySQL, it is the database name.
pub fn host(&self) -> &str
[src]
The provided database host. This will be "localhost"
on SQLite.
pub fn username(&self) -> Option<Cow<str>>
[src]
The provided database user name. This will be None
on SQLite.
pub fn file_path(&self) -> Option<&str>
[src]
The database file for SQLite, otherwise None
.
pub fn sql_family(&self) -> SqlFamily
[src]
The family of databases connected.
pub fn port(&self) -> Option<u16>
[src]
The provided database port, if applicable.
pub fn database_location(&self) -> String
[src]
A string describing the database location, meant for error messages. It will be the host and port on MySQL/Postgres, and the file path on SQLite.
Trait Implementations
impl Clone for ConnectionInfo
[src]
fn clone(&self) -> ConnectionInfo
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ConnectionInfo
[src]
Auto Trait Implementations
impl RefUnwindSafe for ConnectionInfo
impl Send for ConnectionInfo
impl Sync for ConnectionInfo
impl Unpin for ConnectionInfo
impl UnwindSafe for ConnectionInfo
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,