mirror of
https://github.com/launchbadge/sqlx.git
synced 2025-10-02 15:25:32 +00:00
Do not do compile-time checks on pg socket
This commit is contained in:
parent
0ccfab1f25
commit
bcc42644e6
@ -221,21 +221,11 @@ impl PgConnectOptions {
|
|||||||
/// switching the connection method from TCP to the corresponding socket.
|
/// switching the connection method from TCP to the corresponding socket.
|
||||||
///
|
///
|
||||||
/// By default set to `None`.
|
/// By default set to `None`.
|
||||||
#[cfg(unix)]
|
|
||||||
pub fn socket(mut self, path: impl AsRef<Path>) -> Self {
|
pub fn socket(mut self, path: impl AsRef<Path>) -> Self {
|
||||||
self.socket = Some(path.as_ref().to_path_buf());
|
self.socket = Some(path.as_ref().to_path_buf());
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Sets a custom path to a directory containing a unix domain socket,
|
|
||||||
/// switching the connection method from TCP to the corresponding socket.
|
|
||||||
///
|
|
||||||
/// By default set to `None`.
|
|
||||||
#[cfg(not(unix))]
|
|
||||||
pub fn socket(mut self, _: impl AsRef<Path>) -> Self {
|
|
||||||
self
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Sets the username to connect as.
|
/// Sets the username to connect as.
|
||||||
///
|
///
|
||||||
/// Defaults to be the same as the operating system name of
|
/// Defaults to be the same as the operating system name of
|
||||||
|
Loading…
x
Reference in New Issue
Block a user