mirror of
https://github.com/launchbadge/sqlx.git
synced 2025-10-02 23:35:20 +00:00
Update dependencies
This commit is contained in:
parent
2b2d37573c
commit
fecd367e8d
14
Cargo.toml
14
Cargo.toml
@ -22,14 +22,14 @@ postgres = []
|
|||||||
mariadb = []
|
mariadb = []
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
async-std = { version = "1.1", features = ["attributes"] }
|
async-std = { version = "1.1.0", features = ["attributes"] }
|
||||||
async-stream = "0.2"
|
async-stream = "0.2.0"
|
||||||
async-trait = "0.1.11"
|
async-trait = "0.1.18"
|
||||||
bitflags = "1.1.0"
|
bitflags = "1.2.1"
|
||||||
byteorder = { version = "1.3.2", default-features = false }
|
byteorder = { version = "1.3.2", default-features = false }
|
||||||
bytes = "0.4.12"
|
bytes = "0.4.12"
|
||||||
crossbeam-queue = "0.1.2"
|
crossbeam-queue = "0.2.0"
|
||||||
crossbeam-utils = { version = "0.6.6", default-features = false }
|
crossbeam-utils = { version = "0.7.0", default-features = false }
|
||||||
futures-channel = "0.3.1"
|
futures-channel = "0.3.1"
|
||||||
futures-core = "0.3.1"
|
futures-core = "0.3.1"
|
||||||
futures-util = "0.3.1"
|
futures-util = "0.3.1"
|
||||||
@ -42,7 +42,7 @@ uuid = { version = "0.8.1", optional = true }
|
|||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
matches = "0.1.8"
|
matches = "0.1.8"
|
||||||
sqlx-macros = { path = "sqlx-macros/", features = ["postgres", "mariadb", "uuid"] }
|
sqlx-macros = { path = "sqlx-macros/", features = ["postgres", "mariadb", "uuid"] }
|
||||||
criterion = "0.3"
|
criterion = "0.3.0"
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
lto = true
|
lto = true
|
||||||
|
@ -12,4 +12,4 @@ dotenv = "0.15.0"
|
|||||||
tide = "0.3.0"
|
tide = "0.3.0"
|
||||||
tokio = { version = "0.2.0-alpha.4", default-features = false, features = [ "rt-full" ] }
|
tokio = { version = "0.2.0-alpha.4", default-features = false, features = [ "rt-full" ] }
|
||||||
sqlx = { path = "../..", features = [ "postgres" ] }
|
sqlx = { path = "../..", features = [ "postgres" ] }
|
||||||
serde = { version = "1", features = [ "derive"] }
|
serde = { version = "1", features = [ "derive"] }
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
use sqlx::{Pool, Postgres};
|
use sqlx::{Pool, Postgres};
|
||||||
use std::env;
|
use std::env;
|
||||||
use tide::error::ResultExt;
|
use tide::error::ResultExt;
|
||||||
|
use tide::http::StatusCode;
|
||||||
use tide::response;
|
use tide::response;
|
||||||
use tide::EndpointResult;
|
use tide::EndpointResult;
|
||||||
use tide::http::StatusCode;
|
|
||||||
use tide::{App, Context};
|
use tide::{App, Context};
|
||||||
|
|
||||||
// #[async_std::main]
|
// #[async_std::main]
|
||||||
|
@ -8,13 +8,13 @@ edition = "2018"
|
|||||||
proc-macro = true
|
proc-macro = true
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
async-std = "1.0"
|
async-std = "1.1.0"
|
||||||
dotenv = "0.15.0"
|
dotenv = "0.15.0"
|
||||||
futures = "0.3.1"
|
futures = "0.3.1"
|
||||||
proc-macro2 = "1.0.6"
|
proc-macro2 = "1.0.6"
|
||||||
sqlx = { path = "../" }
|
sqlx = { path = "../" }
|
||||||
syn = "1.0"
|
syn = "1.0.8"
|
||||||
quote = "1.0"
|
quote = "1.0.2"
|
||||||
tokio = { version = "0.2.0-alpha.4" }
|
tokio = { version = "0.2.0-alpha.4" }
|
||||||
url = "2.1.0"
|
url = "2.1.0"
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
use bytes::{BufMut, BytesMut};
|
use bytes::{BufMut, BytesMut};
|
||||||
use std::io;
|
use std::io;
|
||||||
|
use async_std::io::{Read, Write, prelude::{ReadExt, WriteExt}};
|
||||||
use async_std::io::prelude::*;
|
use async_std::future::poll_fn;
|
||||||
|
|
||||||
pub struct BufStream<S> {
|
pub struct BufStream<S> {
|
||||||
stream: S,
|
pub(crate) stream: S,
|
||||||
|
|
||||||
// Have we reached end-of-file (been disconnected)
|
// Have we reached end-of-file (been disconnected)
|
||||||
stream_eof: bool,
|
stream_eof: bool,
|
||||||
@ -29,12 +29,6 @@ where
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn close(&mut self) -> io::Result<()> {
|
|
||||||
use futures_util::io::AsyncWriteExt;
|
|
||||||
|
|
||||||
self.stream.close().await
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn buffer_mut(&mut self) -> &mut Vec<u8> {
|
pub fn buffer_mut(&mut self) -> &mut Vec<u8> {
|
||||||
&mut self.wbuf
|
&mut self.wbuf
|
||||||
|
@ -5,6 +5,7 @@ use crate::{
|
|||||||
PostgresDatabaseError, PostgresQueryParameters, PostgresRow,
|
PostgresDatabaseError, PostgresQueryParameters, PostgresRow,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
use std::net::Shutdown;
|
||||||
use byteorder::NetworkEndian;
|
use byteorder::NetworkEndian;
|
||||||
use std::{io, net::SocketAddr};
|
use std::{io, net::SocketAddr};
|
||||||
use async_std::net::TcpStream;
|
use async_std::net::TcpStream;
|
||||||
@ -134,7 +135,7 @@ impl PostgresRawConnection {
|
|||||||
protocol::Terminate.encode(self.stream.buffer_mut());
|
protocol::Terminate.encode(self.stream.buffer_mut());
|
||||||
|
|
||||||
self.stream.flush().await?;
|
self.stream.flush().await?;
|
||||||
self.stream.close().await?;
|
self.stream.stream.shutdown(Shutdown::Both)?;
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user